A table may ask each seat to rank its choices before the deal, in secret; the start line keeps the rankings and create reads them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
1 parent
eca8c92964
commit
8c99126aee
12 files changed
+186
-9
No files matched your search
@@ -65,7 +65,17 @@ export interface GameSpec<State, Input> {
|
||||
*/
|
||||
currentRules: number;
|
||||
|
||||
create(names: Record<SeatId, string>, seed: number, rules: number, options?: TableOptions): State;
|
||||
/**
|
||||
* Begin the game. `rankings` are the seats' preferences, best first, at a
|
||||
* table that asks for them (`rankable`); the ledger's start line keeps them.
|
||||
*/
|
||||
create(names: Record<SeatId, string>, seed: number, rules: number, options?: TableOptions, rankings?: Record<SeatId, string[]>): State;
|
||||
/**
|
||||
* Whether a table with these options asks each seat to rank something
|
||||
* before the deal (sides, roles, colours): the choices to rank, or null.
|
||||
* Each seat ranks in secret; `create` reads every ranking at once.
|
||||
*/
|
||||
rankable?(options: TableOptions): { value: string; label: string }[] | null;
|
||||
/** Resolve one round. Must be a pure function of its arguments: the ledger is replayed through it. */
|
||||
resolve(state: State, inputs: Record<SeatId, Input>): State;
|
||||
/** Whether this seat's input is needed before the next resolution. */
|
||||
|
||||
Reference in new issue
Block a user