func (d Direction) RotateRight() Direction {
	switch d {
	case North:
		return East
	case East:
		return South
	case South:
		return West
	case West:
		return North
	}
	panic("invalid direction")
}
RotateRight rotates the direction 90 degrees to the right horizontally and returns the new direction.
package cube
type Direction int
const (
	North Direction = iota
	South
	West
	East
)
func (d Direction) Opposite() Direction {
	switch d {
	case North:
		return South
	case South:
		return North
	case West:
		return East
	case East:
		return West
	}
	panic("invalid direction")
}
func (d Direction) Face() Face {
	return Face(d + 2)
}