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")
}
Opposite returns the opposite direction.
package cube
type Direction int
const (
	North Direction = iota
	South
	West
	East
)