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
| Name | Kind | What it is |
|---|---|---|
boardFeatures | function | Public board markings (camps, headquarters and lakes), with no role-dependent information. |
legalMovesForCurrentPlayer | function | Legal move coordinates for the player whose turn it is; roles are never returned. |
publicPosition | function | Redacted position for spectators: only player ownership and occupied cells are returned. |
viewForPlayer | function | A player view redacts opponent roles and suppresses the board during device handoff. |