Duels between people: rooms, the hall, and a games ledger

The store plays any seat, locally against the bot or remotely through
the server. A room has a four-letter code that is also its invite link;
the hall opens or joins one and lists the seats this browser holds with
whose move it is. The ledger and summary show every seat, threats name
their wizard, and the board is one component shared by the hall and the
room page.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Eric WagonerandClaude Fable 5.1 committed 2026-09-22 17:07:51 -04:00
1 parent 8366c9d7ff
commit e1bda87987
10 files changed
+1430 -524

No files matched your search

+12
View File
@@ -14,3 +14,15 @@ export function viewFor(state: GameState, viewer: WizardId): GameState {
view.log = view.log.filter((l) => !l.hiddenFrom?.includes(viewer));
return view;
}
/** What a seated player is told by the server. Other seats' moves and tokens never leave it. */
export interface RoomView {
roomId: string;
seq: number;
size: number;
me: WizardId;
seats: { id: WizardId; name: string; bot: boolean }[];
/** Seats that still have to move before the turn resolves. */
waitingOn: WizardId[];
state: GameState | null;
}