hnefatafl
@jeffy24

hnefatafl

A compact 7x7 Tafl board game with king escape, sandwich captures, and a polished 3D board.

About this tile

Hnefatafl is a local two-player Poe app for a compact 7x7 Tafl-style board game. Attackers move first and try to capture the king. Defenders try to escort the king from the center throne to any corner.

This package implements a clear brand-neutral variant: pieces move any open distance orthogonally, only the king may land on the corner escape squares or center throne, ordinary pieces are captured by sandwiching them between allied pieces or a hostile corner/throne, and the king is captured when attackers occupy every open orthogonal side around him. The in-app help reflects these exact rules.

The app uses synced-store for persistent turn state and a Three.js board with touch-sized square targets, selected-piece highlights, legal-target markers, last-move feedback, capture pulses, match scoring, and a compact help overlay. It is tuned for Poe iframes, including a 300 by 500 phone-shaped viewport.

Development

  • bun run doctor checks the local app toolchain.
  • bun run type-check runs TypeScript.
  • bun run test runs synced-store and happy-dom unit tests.
  • bun run build bundles the Poe app.
  • bun run test:playwright builds and runs Playwright E2E coverage.

This package is configured with Poe handle hnefatafl and package name @boardgames/hnefatafl.