Documentation ¶
Index ¶
Constants ¶
View Source
const ( Holes = 5 Snakes = 3 Carrots = 2 LawnLength = 7 LawnArea = LawnLength * LawnLength )
constants that set core game values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Garden ¶
type Garden struct { Lawn *[LawnArea]Grass Score int Dead bool // contains filtered or unexported fields }
Garden stores main info for game to be played
func (*Garden) MoveSnakes ¶
func (ga *Garden) MoveSnakes()
MoveSnakes moves all snake positions by one grass
func (*Garden) ScaleOffset ¶
ScaleOffset rescales offset values when window size changes
Click to show internal directories.
Click to hide internal directories.