A move names the round it was made for; a stale one is refused

The room counts rounds played and sends the count in its view; a page
sends it back with each move, and the server refuses a move whose count
is behind (a slow connection, a second click, a stale tab), or that has
no count at all (an old page, told to reload). Before, such a move was
taken as the move for the next round. Found in Dip's acceptance run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-25 22:19:43 -04:00
co-authored by Claude Opus 5.5
parent af5a8518c7
commit 7f340698d5
6 changed files with 25 additions and 6 deletions
+2
View File
@@ -23,6 +23,8 @@ export interface RoomView<State> {
seats: { id: SeatId; name: string; bot: boolean }[];
/** Seats that still have to move before the round resolves. */
waitingOn: SeatId[];
/** Rounds played so far; a move is sent with the count it was made against. */
resolved: number;
/** The round being written, from one; null before the game begins. */
turn: number | null;
over: Outcome | null;