Support Sapho Truth order during Richese cache auctions

This commit is contained in:
Quintine committed 2026-10-27 18:55:42 +11:00
1 parent 8e16542784
commit 6a31315c95
17 files changed
+420 -25

No files matched your search

@@ -6,7 +6,7 @@ import { createElement } from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import { viewGame, type Action, type GameView } from '../game/engine';
import { RicheseBidPromiseGuide } from '../components/richese-bid-promise-panel';
import { act, inventory, createTruthRicheseBidFixture, declareTruthRicheseBid,
import { act, inventory, passTruthRicheseFreshDiscard, createTruthRicheseBidFixture, declareTruthRicheseBid,
askTruthRicheseBid } from './fixture-truth-richese-bid';
const aliases = registerHooks({
@@ -61,7 +61,7 @@ for (const advanced of [false, true]) void test(
assert.match(auction(respondent), /Richese auction/);
for (const answer of ['yes', 'no'] as const) {
let game = act(asked, f.target, { type: 'truthAnswer', answer });
let game = passTruthRicheseFreshDiscard(act(asked, f.target, { type: 'truthAnswer', answer }));
const own = viewGame(game, f.target), sent: Action[] = [];
assert.ok(own.richeseBidPromises.some(promise => promise.player === f.target && promise.answer === (answer === 'yes')));
assert.ok(own.richeseBidPromiseGuide);