claude (duplicate_chess) a44b4de717 fix(ui): advance turn glow/interactivity to the player to move
`active` was `$derived(gameStore.activeBoards)`, and that getter read the
non-`$state` `#game`. The $derived captured no reactive dependency, so the
glowing/interactive boards froze on North's NW+NE after move 1: the next
player couldn't act, clicks on their boards did nothing, and selections fired
on unexpected boards — the reported "turns", "what piece is selected", and
"mirrored movements" symptoms were all this one stale-derived bug.

Fix: derive `active` from the reactive `view.currentPlayer`; remove the
footgun `activeBoards` getter so nothing re-reads `#game` reactively.

Add scripts/smoke.py: Playwright end-to-end test driving the real app through
a full N->S->E->W round (engine vitest can't see Svelte reactivity wiring).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 09:36:59 -04:00

Duplicate Chess

A local, single-operator browser sandbox for duplicate chess — a four-player chess variant invented by Andrew Freiberg. Four players (North, South, East, West) and four boards (NW, NE, SW, SE); each player controls one colour on two boards and must play the identical move on both. A captured piece leaves a frozen "ghost" twin on the player's other board.

This tool puts all four boards on one screen as a rotated "compass", enforces the synchronized-move coupling, renders ghosts, shows the move-legality intersection, and detects the endgame.

Develop

pnpm install
pnpm dev      # run the dev server
pnpm build    # production build
pnpm test     # run the engine test suite (vitest)

pnpm exec svelte-check --tsconfig ./tsconfig.json typechecks the Svelte/TS code.

Design

See docs/superpowers/specs/2026-05-19-duplicate-chess-design.md for the full design, and docs/superpowers/plans/2026-05-19-duplicate-chess-sandbox.md for the build plan.

This is v1 — a local sandbox. Networked multiplayer, AI opponents, and a free position editor are explicitly out of scope (see the spec, §7).

S
Description
Local browser sandbox for duplicate chess — a four-player coupled-board chess variant
Readme 173 KiB
Languages
TypeScript 61.9%
Svelte 29.4%
Python 7.4%
HTML 0.7%
CSS 0.4%
Other 0.2%