knowyt/server/src/game/struct.go
2021-08-13 02:58:58 +02:00

35 lines
581 B
Go

package game
import (
"sirlab.de/go/knyt/engine"
"sirlab.de/go/knyt/statement"
"sync"
)
const (
STATE_IDLE = "idle"
STATE_ENTER_STATEMENTS = "enter-statements"
STATE_PLAY = "play"
)
type playerInfo struct {
id string
name string
isPlaying bool
isIdle bool
}
type Game struct {
mu sync.Mutex
id string
name string
players map[string]playerInfo
eng *engine.Engine
state string
statements map[string]map[string]*statement.Statement
}
type GameJson struct {
Name string `json:"name"`
}