snake/types.go

23 lines
210 B
Go

package main
const (
Left = iota
Right
Up
Down
)
type Position struct {
x int
y int
}
type Apple Position
type Snake struct {
head Position
tail []Position
length int
direction int
}