v0.3.0 — playtest fixes, two new rules, and §7 enforced
This commit is contained in:
@@ -9,7 +9,7 @@ import assert from 'node:assert/strict';
|
||||
|
||||
import { advance, pump } from '../src/engine/advance.ts';
|
||||
import { applyIntent, areaOf } from '../src/engine/apply.ts';
|
||||
import { STAGES_PER_DAY, lengthProfile, TOTAL_ROLLING_STOCK } from '../src/engine/content.ts';
|
||||
import { HAND_LIMIT, STAGES_PER_DAY, lengthProfile, TOTAL_ROLLING_STOCK } from '../src/engine/content.ts';
|
||||
import { legalActions } from '../src/engine/legal.ts';
|
||||
import { createGame } from '../src/engine/setup.ts';
|
||||
import type { GameConfig, GameState } from '../src/engine/state.ts';
|
||||
@@ -113,6 +113,12 @@ describe('phase sequencing (Gap 1)', () => {
|
||||
seen.push(...r.events.filter((e) => e.type === 'phaseBegan').map(() => s.clock.phase));
|
||||
if (r.needsInput) {
|
||||
applyIntent(s, 0, { type: 'localOps.choose', option: 'draw' });
|
||||
// The opening deal is six cards against a limit of three (§6.2), so a turn cannot be ended
|
||||
// until the hand is played or discarded down. Only the first turn actually has anything to
|
||||
// shed; after that this loop is a no-op.
|
||||
while ((s.decks.hands.get(0) ?? []).length > HAND_LIMIT) {
|
||||
applyIntent(s, 0, { type: 'card.discard', cardId: s.decks.hands.get(0)![0]!, toSlot: 0 });
|
||||
}
|
||||
applyIntent(s, 0, { type: 'draw.end' });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user