| 12345678910111213141516171819202122232425262728 |
- 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
- }
|