No description
Covers gaps in the original Phase E spec: - Solo play reaches the engine: picking Pawns-Only and Classic and asserting the rendered board matches the layout's piece placement (not just that the UI dropdown says so). - Empty layout solo: documents current behavior (solo lets users poke at any layout, validator only gates multiplayer). - Chess960 re-randomizes: takes 8 consecutive snapshots of the back rank and asserts they're not all identical (p(collision)^7 is effectively zero). - Valid ?fen query pre-selects Custom (inverse of the existing malformed-FEN test). - Library operations: full save → star → unstar → delete round trip via the library drawer's aria-labeled buttons. - Layout badge hidden for classic solo games. - Multiplayer with Dunsany: full pipeline proof — picker → Create Room UI → server resolves + validates → room.created echo → joiner renders same Dunsany setup via room.joined echo. Compares rank-1 and rank-8 snapshots between two browser contexts to verify bit-identical rendering. - Server-side rejection: sends a kingless custom layout via raw WebSocket and asserts LAYOUT_INVALID error with a human-readable king-related message. New server-spawn block mirrors multiplayer.spec.ts so the layouts tests can run in isolation or against an existing dev server. 24/24 Playwright tests passing (21 layouts + 2 multiplayer + 1 full-flow) in ~40s. |
||
|---|---|---|
| .github/workflows | ||
| .sisyphus | ||
| docs | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| eslint.config.js | ||
| lefthook.yml | ||
| LICENSE | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.workspace.ts | ||
@paratype
A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.
Packages
packages/rete— Rete II engine corepackages/chess— Browser chess demo (React + Vite)packages/server— Authoritative Bun WebSocket server
Docs
- SPEC.md — Engine specification
- PHASES.md — Development phases & perf budgets
- RULES.md — Chess rule presets
- PROTOCOL.md — WebSocket message protocol
Getting Started
bun install && bun run check