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

Hidden capture-flag rules

import { … } from "@johnmorrisdotca/gunjin/stratego-lite";

4.9 kB minified and gzipped, with everything it imports (measured with esbuild)

Shared immutable match lifecycle for the Capture Flag 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.
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.
STRATEGO_LITE_RULESconstantOriginal streamlined capture-flag rules using the published Original roster and combat table.
strategoCombatfunctionResolves a Capture Flag battle without mutating either piece or match.
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.