types.go 169 B

123456789101112131415
  1. package main
  2. type Position struct {
  3. x int
  4. y int
  5. }
  6. type Apple Position
  7. type Snake struct {
  8. head Position
  9. tail []Position
  10. length int
  11. direction int
  12. }