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
| 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. |
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. |
STRATEGO_LITE_RULES | constant | Original streamlined capture-flag rules using the published Original roster and combat table. |
strategoCombat | function | Resolves a Capture Flag battle without mutating either piece or match. |
submitSetup | function | Submits one player's hidden setup and then shows a pass-device screen. |