func RandomDirection() Direction {
	return Direction(rand.Intn(int(directionCount)))
}
RandomDirection returns random direction
package engine
import "math/rand"
type ErrInvalidDirection struct {
	Direction Direction
}
func (e *ErrInvalidDirection) Error() string {
	return "invalid direction"
}
type Direction uint8
const (
	DirectionNorth Direction = iota
	DirectionEast
	DirectionSouth
	DirectionWest
	directionCount
)
var directionsJSON = map[Direction][]byte{
	DirectionNorth: []byte(`"north"`),
	DirectionEast:  []byte(`"east"`),
	DirectionSouth: []byte(`"south"`),
	DirectionWest:  []byte(`"west"`),
}
var directionsLabels = map[Direction]string{
	DirectionNorth: "north",
	DirectionEast:  "east",
	DirectionSouth: "south",
	DirectionWest:  "west",
}
func (dir Direction) String() string {
	if label, ok := directionsLabels[dir]; ok {
		return label
	}
	return "unknown"
}
var unknownDirectionJSON = []byte(`"-"`)