Support Advanced No-Field reveal during foreign movement
Verify and publish checkpoint container / container (push) Successful in 13m13s

This commit is contained in:
Quintine committed 2026-11-16 18:05:32 +11:00
1 parent ee8ec0a84e
commit 51c48e371b
8 files changed
+316 -9

No files matched your search

@@ -3,6 +3,7 @@ import test from 'node:test';
import { createGame, newPlayer, type Game } from '../game/engine';
import { createRicheseNoField, deployRicheseNoField } from '../game/richese-no-field';
import { richeseRevealForeignMovementPending } from '../game/richese-reveal-foreign-movement';
import { basicPendingMovement } from '../game/basic-pending-movement';
/** Staged response packets exercise only the classifier. Native actions and
* actual reveal/continuation are covered by the separate runtime programme. */
@@ -47,6 +48,26 @@ void test('all three ordinary foreign-movement parents are classified without mu
}
});
void test('Advanced foreign movement is admitted only through the reveal-specific opt-in', () => {
for (const [kind, expected] of [
['fremen', 'pendingFremenMove'], ['ixians', 'pendingIxMove'], ['choam', 'pendingChoamMove'],
] as const) {
const g = movement(kind); g.advanced = true;
assert.equal(basicPendingMovement(g), null);
assert.equal(richeseRevealForeignMovementPending(g), expected);
}
});
void test('Advanced BG movement into the marker territory retains its existing arrival stance', () => {
for (const token of ['zero', 'three'] as const) {
const g = movement('choam'); g.advanced = true; g.players[1].faction = 'beneGesserit';
g.players[0].noField = deployRicheseNoField(createRicheseNoField(['zero', 'three', 'five']), {
tokenId: token, controller: 'r', location: {territory:'carthag', sector:11},
});
assert.equal(richeseRevealForeignMovementPending(g), null);
}
});
void test('foreign movement requires the original actor, source, response and no unrelated child', () => {
for (const kind of ['fremen', 'ixians', 'choam'] as const) {
const g = movement(kind);