Reference
Gunjin Shogi club rules
import { … } from "@johnmorrisdotca/gunjin/gunjin-shogi";
4.8 kB minified and gzipped, with everything it imports (measured with esbuild)
Shared immutable match lifecycle for the club ruleset.
Exports
| Name | Kind | What it is |
|---|---|---|
acceptDraw | function | Accepts the other player's pending draw offer using the current turn token. |
acknowledgePass | function | Confirms that the device has passed to the player named on the cover screen. |
createMatch | function | Creates an authoritative match. |
declineDraw | function | Makes a declined draw offer available again to the moving player. |
GUNJIN_SHOGI_RULES | constant | The documented 31-piece club ruleset, on a plain 9×9 board. |
gunjinCombat | function | Resolves a club-rules Gunjin Shogi battle without mutating match state. |
offerDraw | function | Offers a draw; the other player must accept it on their turn. |
playMove | function | Current-player moves with deterministic stale-turn rejection. |
resignMatch | function | Resignation is public and ends the active player's match. |
rosterForSetup | function | The private roster for the player currently arranging their side. |
submitSetup | function | Submits one player's hidden setup and then shows a pass-device screen. |