package
Version:
v0.0.0-...-b6b0c08
Opens a new window with list of versions in this module.
Published: Apr 2, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
var (
Wall = int('#')
Snake = int('x')
Tail = int('o')
Food = int('*')
Floor = int(' ')
MaxWidth = 0
MaxHeight = 0
CurrentFoodX = -1
CurrentFoodY = -1
Speed = 80
)
func InitFood(board [][]int) [][]int
Initialize a new food randomly.
Manage the snake's speed.
type GameProperty struct {
HeadX int
HeadY int
Score int
Lost int
}
const (
Up Keys = iota
Down
Left
Right
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.