29 lines
955 B
Go
29 lines
955 B
Go
|
package serve
|
||
|
|
||
|
// Game is the JSON DTO for a game.
|
||
|
type Game struct {
|
||
|
// Players is the players in the game.
|
||
|
// The dealer is always the first player.
|
||
|
Players [2]Player `json:"players"`
|
||
|
// Round is the current round.
|
||
|
Round uint `json:"round"`
|
||
|
// Damage is the damage a live shell will deal this turn.
|
||
|
Damage int8 `json:"damage"`
|
||
|
// Shell gives whether the current shell is live if it is revealed.
|
||
|
// Undefined if this game state is not for the current player or if the
|
||
|
// current player hasn't revealed it.
|
||
|
Shell *bool `json:"shell,omitempty"`
|
||
|
// Previous gives whether the previously discharged shell was live.
|
||
|
Previous *bool `json:"previous"`
|
||
|
}
|
||
|
|
||
|
// Player is the JSON DTO for a player.
|
||
|
type Player struct {
|
||
|
// HP is the player's current health.
|
||
|
HP int8 `json:"hp"`
|
||
|
// Items is the player's items.
|
||
|
Items []string `json:"items,omitempty"`
|
||
|
// Cuffs is whether the player is currently wearing cuffs.
|
||
|
Cuffs bool `json:"cuffs,omitempty"`
|
||
|
}
|