game

package
v0.0.0-...-7ed7fe3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeltaX = 2
	DeltaY = 1
)

Variables

View Source
var (
	Directions = movementDirections{0, 1, 2, 3}

	SnakeBodyParts = []*snakeBodyPart{snakeHead}
)

Functions

func GetsnakePositionSet

func GetsnakePositionSet(snake []*snakeBodyPart) map[Position]bool

Types

type Direction

type Direction int

func GetOppositeDirection

func GetOppositeDirection(direction Direction) Direction

type Position

type Position struct {
	X0 int
	Y0 int
	X1 int
	Y1 int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL