| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package main
- import (
- "github.com/gdamore/tcell/v2"
- )
- const (
- Up = iota
- Left
- Right
- Down
- upleft
- upright
- downleft
- downright
- teleport
- )
- type Position struct {
- x int
- y int
- }
- type Player struct {
- position Position
- score int
- moves int
- teleports int
- }
- type Game struct {
- screen tcell.Screen
- style tcell.Style
- keypresses chan int
- player Player
- level int
- robots []Robot
- trash []Position
- gameover int
- }
- type Robot struct {
- id int
- position Position
- }
|