Reference · Hidden capture-flag rules
rosterForSetupfunction
The private roster for the player currently arranging their side.
Import it
import { rosterForSetup } from "@johnmorrisdotca/gunjin/stratego-lite";
Also exported from: @johnmorrisdotca/gunjin/gunjin-shogi
Definition
function rosterForSetup(match: AuthoritativeMatch, player: Player): readonly string[]
Parameters
| Name | Type | Description |
|---|---|---|
match | AuthoritativeMatch | The full authoritative match, held by a trusted host or the local hotseat owner. |
player | Player | The acting player, 0 or 1; the lifecycle checks that this is the expected player. |
Returns
readonly string[]
The private roster for the player currently arranging their side.
Examples
import { createHasamiMatch } from "@johnmorrisdotca/gunjin/hasami";
import { rosterForSetup } from "@johnmorrisdotca/gunjin/stratego-lite";
const base=createHasamiMatch({width:7,height:7});
console.log(rosterForSetup(base,0));[
'leader', 'guard',
'guard', 'guard',
'guard', 'guard',
'guard'
]What it prints (run when this page was built)