A game may take drafts: an input it does not call settled can be replaced, and the round waits for settled ones

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-29 12:14:33 -04:00
co-authored by Claude Opus 5.5
parent 6133a2469a
commit 927e49cf79
4 changed files with 48 additions and 2 deletions
+6
View File
@@ -70,6 +70,12 @@ export interface GameSpec<State, Input> {
resolve(state: State, inputs: Record<SeatId, Input>): State;
/** Whether this seat's input is needed before the next resolution. */
needsInput(state: State, seat: SeatId): boolean;
/**
* Whether a submitted input is final. A game that lets a player save a
* draft and change it answers false until the player says it is done;
* the round waits for every seat's settled input. Absent, every input is final.
*/
settled?(input: Input): boolean;
over(state: State): Outcome | null;
/** The round being written, counted from one, for the ledger and the report pin. */
turn(state: State): number;