Eric WagonerandClaude Fable 5.1 0d2f54fe02 Hnefatafl: Copenhagen and Tablut, a board that ages with the older game, and a bot that looks three moves ahead
The rules are data in rules.ts; the engine plays custodial capture, the
king's own capture rule on and beside the throne, corner and edge
escape, shieldwalls, edge forts, encirclement, repetition and stalemate;
twenty tests pin them and play a bot game to a verdict on both boards.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
2026-09-23 13:06:23 -04:00
2026-09-23 12:45:44 -04:00
2026-09-23 12:45:44 -04:00
2026-09-23 12:45:44 -04:00
2026-09-23 12:45:44 -04:00
2026-09-23 12:45:44 -04:00
2026-09-23 12:45:44 -04:00

Hnefatafl

The Viking board game, in the browser: the attackers must take the king, the king must reach a corner. Copenhagen rules on the eleven-by-eleven board by default; Tablut, the nine-by-nine game Linnaeus wrote down in 1732, as an option, on a board that shows its age.

Built on the game kit: src/lib/game/ is the game (rules as data in rules.ts, the engine in index.ts, a short alpha-beta bot in bot.ts), src/lib/components/Board.svelte is the board, and everything else is the kit's hall, tables, gallery, ledgers, reports desk and ops tools. docs/conventions.md is the house style.

npm install && (cd server && npm install)
npm run server      # the game server on port 8789
npm run dev -- --host

Tests: npm test. Deploy: deploy/deploy.sh <ip> after deploy/README.md.

S
Description
Hnefatafl, the Viking board game, in the browser: Copenhagen rules and Linnaeus's Tablut, on the game kit.
Readme
1.1 MiB
Languages
TypeScript 49.8%
Svelte 35.9%
Shell 10.2%
CSS 1.6%
Python 1.3%
Other 1.2%