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

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

NameTypeDescription
matchAuthoritativeMatch

The full authoritative match, held by a trusted host or the local hotseat owner.

playerPlayer

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)

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