The mouth on a pit's rim may be named in any game

Only a bare step is a matter of revision: from rev 17 a square beside a
mouth is a fork to name; before it the step lands on the square, as the
recorded games did. Naming the mouth was never recorded, so it opens
for every game.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
Eric Wagoner
2026-09-05 22:24:18 -04:00
co-authored by Claude Fable 5.1
parent 461c1a5c83
commit 2812b85016
2 changed files with 16 additions and 9 deletions
@@ -578,7 +578,7 @@ describe("a pit on the board's rim (M4Q7)", () => {
expect(r.events.some((e) => e.type === "jumpedPit" && e.via === "warp")).toBe(true);
});
}
it("a square beside the mouth: rev 17 asks which, rev 16 takes the square", () => {
it("a square beside the mouth: rev 17 asks which, rev 16 steps to the square but may name the mouth", () => {
for (const deckRev of [17, 16]) {
let { state } = createGame({ playerIds: ["alice", "bob"], seed: 42, sets: ["basic", "expansion1"], deckRev });
const site = rimPitSite(state);
@@ -602,8 +602,13 @@ describe("a pit on the board's rim (M4Q7)", () => {
const p = bare.state.players.find((p) => p.id === me.id)!;
expect(p.inPit || cellKey(p.position) === cellKey(neighbor(site.pit, site.floor[0]!))).toBe(true);
}
// Named, the mouth is taken in any revision.
const mouth = applyCommand(state, me.id, { type: "move", direction: site.mouth, exit: site.mouth });
expect(mouth.ok).toBe(false);
expect(mouth.ok).toBe(true);
if (mouth.ok) {
const p = mouth.state.players.find((p) => p.id === me.id)!;
expect(p.inPit || cellKey(p.position) === cellKey(site.far.to)).toBe(true);
}
}
}
});