include shell counts in game dto

This commit is contained in:
2024-01-29 21:20:17 -06:00
parent f858384ca0
commit e8a181a4f7
3 changed files with 62 additions and 67 deletions

View File

@@ -17,6 +17,12 @@ type Game struct {
Shell *bool `json:"shell,omitempty"`
// Previous gives whether the previously discharged shell was live.
Previous *bool `json:"previous"`
// Live is the number of live shells this round, if it is the first turn
// of the round.
Live int `json:"live,omitempty"`
// Blank is the number of blank shells this round, if it is the first turn
// of the round.
Blank int `json:"blank,omitempty"`
}
// Player is the JSON DTO for a player.
@@ -37,9 +43,3 @@ type GameStart struct {
ID GameID `json:"id"`
Dealer bool `json:"dealer"`
}
// ShellCounts is the JSON DTO for shell counts emitted at the start of a shell group.
type ShellCounts struct {
Live int `json:"live"`
Blank int `json:"blank"`
}