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

Redacted player and observer views

import { … } from "@johnmorrisdotca/gunjin/views";

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

Exports

NameKindWhat it is
boardFeaturesfunctionPublic board markings (camps, headquarters and lakes), with no role-dependent information.
legalMovesForCurrentPlayerfunctionLegal move coordinates for the player whose turn it is; roles are never returned.
publicPositionfunctionRedacted position for spectators: only player ownership and occupied cells are returned.
viewForPlayerfunctionA player view redacts opponent roles and suppresses the board during device handoff.

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