Reference · Hidden capture-flag rules
createMatchfunction
Creates an authoritative match. Keep this state on a trusted host.
Import it
import { createMatch } from "@johnmorrisdotca/gunjin/stratego-lite";
Also exported from: @johnmorrisdotca/gunjin/gunjin-shogi
Definition
function createMatch(mode: GameMode, size?: SetupSize): AuthoritativeMatch
Parameters
| Name | Type | Description |
|---|---|---|
mode | GameMode | The native rule-mode key. |
size (optional) | SetupSize | A supported board size; Hasami accepts 7 or 9 square holes per side. |
Returns
AuthoritativeMatch
Creates an authoritative match. Keep this state on a trusted host.
Examples
import { createMatch } from "@johnmorrisdotca/gunjin/stratego-lite";
console.log(createMatch("gunjin-shogi").phase);setupWhat it prints (run when this page was built)