No description
Phase B.1 of the rule-variants epic. Knights are royal pieces via the getRoyalPieces hook; kings lose their special status. Every knight of `color` is royal, so the game only ends when the LAST knight is mated or captured. Rules-only preset — applies to any layout, though naturally paired with the existing `knightmate` layout. Test count: 1448 baseline → 1479 total (+31). The knightmate-rules test file contributes 10 behavioral tests (a–j) covering baseline, check detection on a royal knight, mate detection, zero-knights degenerate semantics, king non-royalty, multi-royal check, pinned royals, piece-hp composition, and incompatibility enforcement. The other +21 delta comes from parallel Phase-A/B tests already landed in the tree. - packages/chess/src/presets/knightmate-rules.ts (new) - packages/chess/src/presets/knightmate-rules.test.ts (new, 10 tests) - packages/chess/src/presets/index.ts (barrel import) - packages/chess/src/presets/presets.test.ts (count 15 → 16) |
||
|---|---|---|
| .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