Add BoardShape to custom lobby rules with 'Default' (auto by player count)

- CustomLobby: add BoardShapeOverride (null/"Default" → AutoShape at game start)
- CustomRulesOverride: add optional BoardShape string field for lobby creation/update
- CustomRulesDto: add BoardShape field exposed to clients ("Default" | shape name)
- GameCreateCustomLobbyHandler: store + pass BoardShapeOverride; ToDto gains
  optional boardShape param so shape is reflected in the creation response
- GameGetLobbyHandler / GameJoinCustomLobbyHandler / GameListCustomLobbiesHandler
  / GameListActiveLobbiesHandler: all pass lobby.BoardShapeOverride to ToDto
- GameUpdateLobbyRulesHandler: store BoardShapeOverride when rules are edited
- GameLobbyReadyHandler: resolve boardShape — use explicit override when set,
  otherwise fall back to BoardShapeGenerator.AutoShape(playerCount)
- EF migration AddBoardShapeOverride: adds board_shape_override column

Valid BoardShape values: null | "Default" | "Rectangle" | "Cross" |
  "Triangular" | "RadialStar" | "HexRing"

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-26 11:02:44 -04:00
co-authored by Claude Happy
parent 7b1e7e346a
commit 766ba336ec
11 changed files with 528 additions and 13 deletions
+12 -5
View File
@@ -119,8 +119,13 @@ public sealed record CustomRulesOverride(
int? TurnTimerSeconds = null,
int? TimeLimitMinutes = null,
int? TurnLimit = null,
int? MpBuff = null,
int? StartingRandomTilePct = null);
int? MpBuff = null,
int? StartingRandomTilePct = null,
/// <summary>
/// Board shape. Null or "Default" = auto-select by player count via BoardShapeGenerator.AutoShape.
/// Explicit values: "Rectangle" | "Cross" | "Triangular" | "RadialStar" | "HexRing".
/// </summary>
string? BoardShape = null);
/// <summary>Join an open custom lobby with the specified deck.</summary>
public sealed record JoinCustomLobbyRequest(Guid LobbyId, Guid DeckId, string? Password = null);
@@ -672,9 +677,11 @@ public sealed record CustomRulesDto(
int TurnTimerSeconds,
int TimeLimitMinutes,
int TurnLimit,
int MpBuff,
int StartingRandomTilePct,
bool HasPassword);
int MpBuff,
int StartingRandomTilePct,
/// <summary>"Default" = auto by player count; otherwise explicit shape name.</summary>
string BoardShape,
bool HasPassword);
/// <summary>Client-facing lobby preset summary.</summary>
public sealed record LobbyPresetDto(