Reference · Rules, maps and records
countedfunction
THE COUNT, when the last round is over: whoever holds the most territories wins; level on territories, whoever has more armies on the map; level on both, they share the win.
Import it
import { counted } from "@johnmorrisdotca/tenka";
Definition
function counted(game: TenkaGame): TenkaGame
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
Returns
TenkaGame
THE COUNT, when the last round is over: whoever holds the most territories wins; level on territories, whoever has more armies on the map; level on both, they share the win.
Examples
import { counted, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(counted(game).winners);[ 0, 1 ]What it prints (run when this page was built)