You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go opts into kRoundRobins: createRoundRobin (entrants + GoStartGame terms, refused when no game could open on them), and chess's withdraw, forfeit, roundRobins and playRoundRobin shapes.
A pairing's table waits on the round robin's terms (go takes challenges), starts when the opponent sits, and opens with the pairing's Black on move: go::Table::open takes a black_seat.
Its one game, off the table's own score sheet as pong's is, decides the pairing: winner, or a draw on an even count. Results are scored by the existing rules.
Wire: GoRoundRobin is chess's round robin with go's terms. It reuses ChessPairing and ChessStanding, and chess's view builder now serves both. GoView.roundRobinId names a pairing's table.
Stored body: {"game":"go","terms":{"size","komi","initialMs","incrementMs"},...}, pinned both ways beside chess's and pong's.
Rollback: a pre-change binary skips stored go round robins (logged, untouched, back on roll-forward). Their waiting pairing tables lose the pair gate and the pairing's colours until then.
Tests: go_round_robin_e2e_test, written first:
create, and refuse bad terms;
a pairing's table starts on the round robin's terms with its Black, and scores a resignation;
an even count draws for half a point each;
leaving a pairing's game loses it;
forfeit and withdraw;
one game per table;
go's envelope refuses a chess round robin.
Also: engine black_seat, body round trip and refusals, the stored-body pin, the wire builder. //domains/games/... green with Postgres. scripts/mutation-check kills the pairing's Black, the terms check, the terms the table starts on, TableGame, the body read, forfeit and withdraw.
Review panel ran; fixups in f2f886c (forfeit/withdraw/leave tests, docs that named only chess and pong). Not taken: sharing the three adapters' near-identical round-robin decode and event hooks, until a fourth game has round robins.
Phase 3 of #1668: go opts into kRoundRobins on chess's rules and pong's table-game scoring path. Tip includes the panel fixup (forfeit/withdraw/leave e2e, docs that now name go).
What lands
kRoundRobins + create/withdraw/forfeit/roundRobins/playRoundRobin on go's envelope; bad terms refused via go::CheckRules at create, same gate as challenges.
Pairing tables wait on the RR's terms (RoundRobinStart from table_terms, chess's pattern), open with the pairing's Black (Table::open(..., black_seat)), play one game, score off the sheet (TableGame → empty winner is draw).
Wire: GoRoundRobin shares chess pairings/standings via ColouredRoundRobinOf; body {"game":"go","terms":{...}} pinned both ways; each envelope still refuses another game's RR.
Engine: black_seat default 0 keeps non-RR opens; next game still swaps.
Checked
Open finds Black from pairing->black in roster; invalid seat fails CheckSetup (0|1). View lists Black first by color, so the e2e colour asserts bite.
Draw path: even area score → sheet winner absent → EventGame.winnernullopt → EffectivePairings draw / 0.5 — covered by AnEvenCountDrawsThePairing.
Takes the deferred share: RoundRobinMove for withdraw/forfeit/roundRobins/playRoundRobin, and RoundRobinWire + shared wrap in adapters.cc for the list/single events. createRoundRobin stays per-game (terms). Concept and EveryRoundRobinGameDecodesTheSharedMovesAlike pin all three.
Net deletion, behaviour unchanged. Waiting on CI for this tip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1668 phase 3.
createRoundRobin(entrants +GoStartGameterms, refused when no game could open on them), and chess'swithdraw,forfeit,roundRobinsandplayRoundRobinshapes.go::Table::opentakes ablack_seat.GoRoundRobinis chess's round robin with go's terms. It reusesChessPairingandChessStanding, and chess's view builder now serves both.GoView.roundRobinIdnames a pairing's table.{"game":"go","terms":{"size","komi","initialMs","incrementMs"},...}, pinned both ways beside chess's and pong's.Rollback: a pre-change binary skips stored go round robins (logged, untouched, back on roll-forward). Their waiting pairing tables lose the pair gate and the pairing's colours until then.
Tests:
go_round_robin_e2e_test, written first:Also: engine
black_seat, body round trip and refusals, the stored-body pin, the wire builder.//domains/games/...green with Postgres.scripts/mutation-checkkills the pairing's Black, the terms check, the terms the table starts on, TableGame, the body read, forfeit and withdraw.Review panel ran; fixups in f2f886c (forfeit/withdraw/leave tests, docs that named only chess and pong). Not taken: sharing the three adapters' near-identical round-robin decode and event hooks, until a fourth game has round robins.
UI follows in muchq/muchq.github.io once muchq/muchq.github.io#461 merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xae1QBa2qHX32DPVGSq19F