snengame/internal/game/cmd.go
2021-07-22 15:37:25 -04:00

24 lines
476 B
Go

package game
type CmdType string
const (
ActCmd = "a"
StateCmd = "s"
DebugCmd = "d"
)
type Command struct {
PlayerID int `json:"player_id"`
Type CmdType `json:"type"`
Cmd string `json:"cmd"`
}
type CommandResult struct {
PlayerID int `json:"player_id"`
ResultType CmdType `json:"result_type"`
StateResult *GameView `json:"state_result"`
ActionResult []Card `json:"action_result"`
DebugResult *Game `json:"debug_result"`
}