Skip to the content

Gunjin軍人

Play five hidden-rank games, keep setups private, share redacted views and replay, and pass one device between players.

Gunjin is the Japanese word 軍人 for a soldier. About the name

Contents

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

NameKindWhat it is
acceptDrawfunctionAccepts the other player's pending draw offer using the current turn token.
acknowledgePassfunctionConfirms that the device has passed to the player named on the cover screen.
createMatchfunctionCreates an authoritative match.
declineDrawfunctionMakes a declined draw offer available again to the moving player.
GUNJIN_SHOGI_RULESconstantThe documented 31-piece club ruleset, on a plain 9×9 board.
gunjinCombatfunctionResolves a club-rules Gunjin Shogi battle without mutating match state.
offerDrawfunctionOffers a draw; the other player must accept it on their turn.
playMovefunctionCurrent-player moves with deterministic stale-turn rejection.
resignMatchfunctionResignation is public and ends the active player's match.
rosterForSetupfunctionThe private roster for the player currently arranging their side.
submitSetupfunctionSubmits one player's hidden setup and then shows a pass-device screen.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/gunjin 0.2.1.