Allow Richese reveal during Emperor revival
Verify and publish checkpoint container / container (push) Canceled after 0s

This commit is contained in:
Quintine committed 2026-10-29 18:41:15 +11:00
1 parent cfccfe5acb
commit a10e019b01
9 files changed
+260 -16

No files matched your search

@@ -15,7 +15,7 @@ const player = (g: Game, id: string) => {
/** Genuine Advanced Richese/Atreides/Emperor setup, Black Market offer and
* successful inspection. Only the existing Truthtrance is moved between hands
* so a different faction can ask the native Atreides seat. */
function inspectedLot() {
function inspectedLot(method: 'silent' | 'onceAround' = 'silent') {
const fixture = createTruthtranceRichesePromisesFixture({ advanced: true });
let game = structuredClone(fixture.game);
const atreides = player(game, 'atreides'), emperor = player(game, 'emperor');
@@ -25,7 +25,7 @@ function inspectedLot() {
game = advance(game, state => state.decision?.kind === 'richeseBlackMarket');
const card = player(game, 'richese').hand.find(candidate => candidate.name === 'Shield'); assert.ok(card);
game = act(game, 'richese', { type:'decision', event:game.richeseBidding!.event,
card:card.id, method:'silent' } as Action);
card:card.id, method, ...(method === 'onceAround' ? { direction:'clockwise' } : {}) } as Action);
for (let count = 0; game.response && count < 20; count++) {
const respondent = game.players.find(candidate => !game.response!.passed.includes(candidate.id));
assert.ok(respondent); game = act(game, respondent.id, {type:'passResponse'});
@@ -48,8 +48,9 @@ function ask(game: Game, truth: string, name: string): Game {
fact:{kind:'auctionPeek',name}}});
}
void test('native Advanced Black Market inspection gives Atreides a private Yes or No and all bots answer legally', () => {
const {game, card, truth} = inspectedLot();
for (const method of ['silent', 'onceAround'] as const) void test(`native Advanced ${method} Black Market inspection gives Atreides a private Yes or No and all bots answer legally`, () => {
const {game, card, truth} = inspectedLot(method);
assert.equal(game.richeseAuction?.method, method);
for (const [name,answer] of [[card.name,'yes'],['Snooper','no']] as const) {
const question = ask(structuredClone(game), truth.id, name);
assert.equal(viewGame(question, 'atreides').truthAnswer, answer);