indicate in game state whose turn it is

This commit is contained in:
2024-01-30 21:09:50 -06:00
parent b837facd4a
commit 3d9a0b9836
6 changed files with 11 additions and 3 deletions

View File

@@ -237,6 +237,7 @@ func (g *Match) DTO(id player.ID) serve.Game {
g.players[1].DTO(),
},
Round: g.round,
Dealer: g.CurrentPlayer() == &g.players[0],
Damage: g.damage,
Shell: g.Peek(id),
Previous: g.prev,

View File

@@ -445,6 +445,7 @@ func TestGameDTO(t *testing.T) {
g.players[1].DTO(),
},
Round: g.round,
Dealer: false,
Damage: g.damage,
Shell: nil,
Previous: nil,
@@ -469,6 +470,7 @@ func TestGameDTO(t *testing.T) {
g.players[1].DTO(),
},
Round: g.round,
Dealer: true,
Damage: g.damage,
Shell: nil,
Previous: &g.shellArray[0],