snake

package
v0.0.0-...-bc71988 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 8 Imported by: 5

Documentation

Index

Constants

View Source
const (
	MOVE keyboardEventType = 1 + iota
	RETRY
	END
)

Keyboard events

View Source
const (
	RIGHT direction = 1 + iota
	LEFT
	UP
	DOWN
)

Allowed snake movement directions

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	// contains filtered or unexported fields
}

Game type

func NewGame

func NewGame() *Game

NewGame creates new Game object

func (*Game) Start

func (g *Game) Start()

Start starts the game

Jump to

Keyboard shortcuts

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