rowboz/types.go

42 lines
481 B
Go
Raw Normal View History

package main
import "github.com/gdamore/tcell/v2"
const (
Up = iota
Left
Right
Down
2023-12-01 22:41:35 +01:00
upleft
upright
downleft
downright
teleport
)
type Position struct {
x int
y int
}
type Player struct {
position Position
2023-12-01 23:08:17 +01:00
score int
moves int
teleports int
}
type Robot struct {
position Position
}
type Game struct {
screen tcell.Screen
style tcell.Style
keypresses chan int
player Player
robots []Robot
trash []Position
gameover int
}