snake

package
v0.0.0-...-6d6c343 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScreenWidth  = 320
	ScreenHeight = 240
	TileSize     = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Food

type Food struct {
	Position Point
}

func NewFood

func NewFood() *Food

type Game

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

type Point

type Point struct {
	X int
	Y int
}

type Snake

type Snake struct {
	Body        []Point
	Direction   Point
	GrowCounter int
}

func NewSnake

func NewSnake() *Snake

func (*Snake) Move

func (s *Snake) Move()

Jump to

Keyboard shortcuts

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