Coordinates on the board, moves in the record shown on the board, a status strip above it with the capture in words, notes under the variant selector and a still that follows it, keyboard play, and a way back to the game from the rules

From a tester's review.

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-23 18:48:53 -04:00
co-authored by Claude Fable 5.1
parent bac7182915
commit 5db89edbc1
7 changed files with 329 additions and 107 deletions
+6 -6
View File
@@ -44,9 +44,9 @@ export interface State {
export type Input = { from: number; to: number };
export const SIDES: { value: Side; label: string }[] = [
{ value: 'defenders', label: 'the defenders, with the king' },
{ value: 'attackers', label: 'the attackers' }
export const SIDES: { value: Side; label: string; note: string }[] = [
{ value: 'defenders', label: 'the defenders, with the king', note: 'Fewer pieces, and the king must reach safety before the ring closes.' },
{ value: 'attackers', label: 'the attackers', note: 'Twice the pieces, and the first move; close every road and take the king.' }
];
// --- The board ---------------------------------------------------------------
@@ -91,7 +91,7 @@ function neighbors(size: number, i: number): number[] {
}
/** The square on the far side of `mid` from `from`, or -1 off the board. */
function beyond(size: number, from: number, mid: number): number {
export function beyond(size: number, from: number, mid: number): number {
const a = cellOf(size, from);
const b = cellOf(size, mid);
const c = { x: b.x + (b.x - a.x), y: b.y + (b.y - a.y) };
@@ -390,8 +390,8 @@ export const game: GameSpec<State, Input> = {
key: 'set',
label: 'Rules',
choices: [
{ value: 'copenhagen', label: 'Copenhagen, 11 by 11' },
{ value: 'tablut', label: 'Tablut, 9 by 9, after Linnaeus' }
{ value: 'copenhagen', label: 'Copenhagen, 11 by 11', note: 'The modern tournament game. The king escapes to a corner and falls only to four attackers, three beside the throne.' },
{ value: 'tablut', label: 'Tablut, 9 by 9, after Linnaeus', note: 'The older game. The king escapes to any edge square, and away from the throne two attackers take him like any piece.' }
],
default: 'copenhagen'
},