29 lines
287 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
}
type Score struct {
score int
scoreCounter int
reason int
}