Reference · Rules, maps and records
armiesHeldfunction
How many armies an owner has on the map.
Import it
import { armiesHeld } from "@johnmorrisdotca/tenka";
Definition
function armiesHeld(game: Pick<TenkaGame, "owners" | "armies">, owner: TenkaOwner): number
Parameters
| Name | Type | Description |
|---|---|---|
game | Pick<TenkaGame, "owners" | "armies"> | The current native game state. |
owner | number | The seat index, or the neutral-owner marker. |
Returns
number
How many armies an owner has on the map.
Examples
import { armiesHeld, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(armiesHeld(game,0));40What it prints (run when this page was built)