snake/types.go

16 lines
169 B
Go

package main
type Position struct {
x int
y int
}
type Apple Position
type Snake struct {
head Position
tail []Position
length int
direction int
}