Documentation ¶
Index ¶
Constants ¶
View Source
const ( Left = 1 + iota Right Up Down )
View Source
const ( HELP = "\n\nuse arrow keys, wasd or hjkl to move the snake.\n" GAMEOVER = "\n\nGAME OVER\n" QUIT = "press 'q' or 'ctrl + c' to quit.\n" )
View Source
const INTERVAL = 100
Variables ¶
This section is empty.
Functions ¶
func RenderArena ¶
func RenderArena(m *Model)
func RenderFood ¶
func RenderFood(m *Model)
func RenderGameOver ¶
func RenderGameOver() string
func RenderHelp ¶
func RenderQuitcommand ¶
func RenderQuitcommand() string
func RenderScore ¶
func RenderSnake ¶
func RenderSnake(m *Model)
func RenderTitle ¶
func RenderTitle() string
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func InitialModel ¶
func InitialModel() Model
Click to show internal directories.
Click to hide internal directories.