Victory gets its moment: a gold-ringed proclamation

Winning showed only as a small slip in the rail — anticlimactic, as
playtesting put it. The engine now records HOW the game was won
(winReason: treasures carried home, or last wizard standing) alongside
the winner, the view carries it, and the finish opens a gold-ringed
modal: trophy, the winner's name in tall caps, and the manner of
victory in a handwritten line. "Behold the final board" dismisses it
to the finished table. In hotseat the one screen proclaims to the
whole table at once; in async games each player is greeted by it when
they next open the game.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Eric Wagoner
2026-08-16 11:11:24 -04:00
co-authored by Claude Fable 5
parent 8f7beb5ef3
commit 13aeeea0ef
3 changed files with 49 additions and 0 deletions
+2
View File
@@ -37,6 +37,7 @@ export interface GameView {
you: PlayerId;
phase: GameState["phase"];
winner: PlayerId | null;
winReason: "treasures" | "lastStanding" | null;
turn: TurnState;
activePlayerId: PlayerId;
/** Board with dynamic wall changes already merged in. */
@@ -88,6 +89,7 @@ export function viewFor(state: GameState, playerId: PlayerId): GameView {
you: playerId,
phase: state.phase,
winner: state.winner,
winReason: state.winReason,
turn: state.turn,
activePlayerId: state.players[state.turn.activeIndex]!.id,
board,