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:
1 parent
944e4e8306
commit
0be89a1dfe
28 files changed
+227
-340
No files matched your search
@@ -31,12 +31,13 @@ export const LETTERS: Record<Kind, string> = {
|
||||
S: 'S', G: 'G', R: 'Dr', W: 'W', O: 'O', U: 'U', H: 'H', T: 'T', C: 'C', M: 'M', K: 'K', P: 'P', D: 'D', B: 'B', E: 'E'
|
||||
};
|
||||
|
||||
/** Gygax's values, with the King beyond price. */
|
||||
/** Gygax's values. He gives the King none: 0 here, and the panel says "beyond price". */
|
||||
export const VALUES: Record<Kind, number> = {
|
||||
K: 0, M: 11, P: 10, C: 9, R: 8, G: 5, O: 5, H: 4.5, T: 4, E: 4, B: 3, U: 2.5, D: 2, S: 1, W: 1
|
||||
};
|
||||
|
||||
export const SIDES: Side[] = ['gold', 'scarlet'];
|
||||
export const SIDE_NAMES: Record<Side, string> = { gold: 'Gold', scarlet: 'Scarlet' };
|
||||
export const other = (side: Side): Side => (side === 'gold' ? 'scarlet' : 'gold');
|
||||
|
||||
/** A cell index from level 1 to 3, file 0 to 11 and rank 0 to 7. */
|
||||
@@ -128,11 +129,10 @@ export function movesFrom(cells: Cell[], from: number, setup: Setup = 'printed')
|
||||
const enemy = (i: number) => cells[i] !== '' && sideOf(cells[i]) !== side;
|
||||
const open = (i: number) => cells[i] === '' || sideOf(cells[i]) !== side;
|
||||
/** Add the square if it is on the board and passes the test. */
|
||||
const add = (lv: number, file: number, rank: number, ok: (i: number) => boolean) => {
|
||||
if (lv < 1 || lv > LEVELS || !inBounds(file, rank)) return false;
|
||||
const add = (lv: number, file: number, rank: number, ok: (i: number) => boolean): void => {
|
||||
if (lv < 1 || lv > LEVELS || !inBounds(file, rank)) return;
|
||||
const i = idx(lv, file, rank);
|
||||
if (ok(i)) out.push(i);
|
||||
return true;
|
||||
};
|
||||
/** Slide until something is in the way; a piece of the other side may be taken. */
|
||||
const slide = (dirs: number[][]) => {
|
||||
|
||||
Reference in new issue
Block a user