Credibility pass: the code reads as one hand's work. Dead plumbing and copies removed, four claims the source does not support corrected, and inherited kit text re-read for this game

Engine: the facade re-exports the board in one block; describe() and the
dead letters preference, void ply, the King-taken line, the identity maps
and the unused imports are gone; SIDE_NAMES is the one spelling of a side;
the drake's hunter comment no longer claims only four kinds reach the air.
Prose: no shatranj and no sitting duck, which Gygax never wrote; the Thief
statistic and the Basilisk's "one trick" are gone; lessons say what the
board shows instead of repeating the panel; a Thief's leap counts four.
Browser: one keyboard walk, in BoardArtwork; the lesson board and page share
one game and one inspected piece; the chronicle's possessive is told, not
patched by a regex; the chronicle colours and the reading layout are global
rules instead of three copies; the guide and the about panel say what the
code and the article actually do.
Server and docs: the room server states that it is the kit's, kept whole;
the skills, the deploy README and the share card name files that exist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CCLa2PaEeCj8njQZSWGqHx
This commit is contained in:
Eric WagonerandClaude Fable 5.1 committed 2026-10-26 22:38:00 -04:00
1 parent 944e4e8306
commit 0be89a1dfe
28 files changed
+227 -340

No files matched your search

+5 -6
View File
@@ -1,6 +1,7 @@
import { describe, expect, it } from 'vitest';
import { SCENES, sceneCells } from './lessons';
import { frozen, hasLegalMove, inCheck, kindOf, legalMovesFrom, movesFrom, other, playOn, square } from './board';
import { frozen, hasLegalMove, inCheck, kindOf, legalMovesFrom, movesFrom, playOn, square } from './board';
import { CALLOUTS, TOLD_MOVES, toldStates } from './told';
describe('the lessons', () => {
it('every scene’s move is legal for the side to move, and only the asked-for moves count', () => {
@@ -29,7 +30,7 @@ describe('the lessons', () => {
return { cells, after: playOn(cells, square(from), square(to)), s };
};
// The Warrior's step is blocked and its capture is not.
expect(movesFrom(sceneCells(at('warrior')), square('2c2')).map((i) => i)).toEqual([square('2d3')]);
expect(movesFrom(sceneCells(at('warrior')), square('2c2'))).toEqual([square('2d3')]);
// The Hero leaps the Warrior and takes the Mage.
expect(play('hero').after.captured).toBe('M');
// The Mage comes down two boards onto the Basilisk.
@@ -51,7 +52,7 @@ describe('the lessons', () => {
// The King is in check before it moves, and out of it after either move; up or down leaves it off the land.
const king = sceneCells(at('king'));
expect(inCheck(king, 'gold')).toBe(true);
expect(legalMovesFrom(king, square('2g1'), 'printed').map((i) => i).sort()).toEqual([square('1g1'), square('2f1'), square('2h1'), square('3g1')].sort());
expect(legalMovesFrom(king, square('2g1'), 'printed').sort()).toEqual([square('1g1'), square('2f1'), square('2h1'), square('3g1')].sort());
// The last scene is mate in one by either listed move, and by no other.
const mate = play('mate');
for (const [from, to] of mate.s.moves) {
@@ -67,13 +68,11 @@ describe('the lessons', () => {
}
expect(kindOf(mate.cells[square('2d4')])).toBe('K');
expect(frozen(mate.cells, square('2d4'))).toBe(true);
void other;
});
});
describe('the game told', () => {
it('plays through the engine from the opening to a checkmate, and every callout sits on a move', async () => {
const { toldStates, TOLD_MOVES, CALLOUTS } = await import('./told');
it('plays through the engine from the opening to a checkmate, and every callout sits on a move', () => {
const states = toldStates();
expect(states).toHaveLength(TOLD_MOVES.length + 1);
const last = states[states.length - 1];