Add PlayerOneAccountId to GameStateDto; fix placement row detection

Client had no way to know if it was P1 or P2, so _valid_placement_tiles
always chose row bh-1. Now the DTO exposes playerOneAccountId so the
client can correctly pick row 0 (P1) or row bh-1 (P2).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-07 11:26:56 -05:00
co-authored by Claude Happy
parent 926c9d53a6
commit 30c7bef445
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -892,6 +892,7 @@ public static class GameEngine
SessionId : state.SessionId,
Phase : state.Phase.ToString(),
ActivePlayerAccountId : state.ActivePlayerAccountId,
PlayerOneAccountId : state.PlayerOneAccountId,
TurnNumber : state.TurnNumber,
StateVersion : state.NextActionSequence,
Players : players,
+1
View File
@@ -200,6 +200,7 @@ public sealed record GameStateDto(
Guid SessionId,
string Phase, // Placement | Draw | Main | End | GameOver
string ActivePlayerAccountId,
string PlayerOneAccountId, // used by client to determine placement row
int TurnNumber,
int StateVersion, // monotonic; use for client mismatch detection
IEnumerable<PlayerStateDto> Players,