Documentation ¶ Index ¶ type CellType type Direction type Game func NewGame(width, height int, render func(cells [][]CellType, alive bool), ...) *Game func (self *Game) Exit() func (self *Game) SetDirection(direction Direction) func (self *Game) Start() type Position type State Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type CellType ¶ type CellType int const ( None CellType = iota Snake Food ) type Direction ¶ type Direction int const ( Up Direction = iota Down Left Right ) type Game ¶ type Game struct { // contains filtered or unexported fields } func NewGame ¶ func NewGame(width, height int, render func(cells [][]CellType, alive bool), logger func(string)) *Game func (*Game) Exit ¶ func (self *Game) Exit() func (*Game) SetDirection ¶ func (self *Game) SetDirection(direction Direction) func (*Game) Start ¶ func (self *Game) Start() type Position ¶ type Position struct { // contains filtered or unexported fields } type State ¶ type State struct { // contains filtered or unexported fields } Source Files ¶ View all Source files snake.go Click to show internal directories. Click to hide internal directories.