Gunjin documentation
Gunjin 軍人 — Hidden-rank strategy games
Play five hidden-rank games, keep setups private, share redacted views and replay, and pass one device between players.
Install
npm install @johnmorrisdotca/gunjin
Start here
Entry points
| Import it | What it is | Size |
|---|---|---|
@johnmorrisdotca/Hidden Hasami rules · 4 exports | 4.6 kB | |
@johnmorrisdotca/Luzhanqi Mini rules · 4 exports | 4.6 kB | |
@johnmorrisdotca/Salpakan rules · 4 exports | 4.6 kB | |
@johnmorrisdotca/Hidden capture-flag rules · 11 exports | Shared immutable match lifecycle for the Capture Flag ruleset. | 4.9 kB |
@johnmorrisdotca/Gunjin Shogi club rules · 11 exports | Shared immutable match lifecycle for the club ruleset. | 4.8 kB |
@johnmorrisdotca/Trusted host storage · 2 exports | 4.0 kB | |
@johnmorrisdotca/Redacted player and observer views · 4 exports | 4.1 kB | |
@johnmorrisdotca/SVG boards · 2 exports | 4.8 kB | |
@johnmorrisdotca/Native shared-device player · 3 exports | 12.3 kB | |
@johnmorrisdotca/Views, replay and player · 30 exports | SVG board rendering and its optional visual settings. | 12.9 kB |
Guides
How-to
- Select one of the five rule modesKeep each mode’s roster, terrain, movement and battle rules together.
- Pass the device and reject stale actionsUse setupStep and turn with the native lifecycle.
- Show only the viewer’s informationSeparate authoritative state, player views and observer positions.
- Choose public replay or trusted storageShare redacted records while keeping role-bearing storage private.
- Resign or agree a drawKeep ending requests on the native player/turn boundary.
- Draw redacted boards and terrainUse native views, board features and presentation-only choices.
- Mount the native shared-device playerKeep independent instances and expose only redacted handles/callbacks.