Reference · Rules, maps and records
tenkaMovesfunction
Every move the player to move may make now, each one playTenka accepts.
Placing is listed as one army or all still waiting, on each territory held,
since any spread is a run of those. None once the game is over.
Import it
import { tenkaMoves } from "@johnmorrisdotca/tenka";
Definition
function tenkaMoves(game: TenkaGame): TenkaMove[]
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
Returns
TenkaMove[]
Every move the player to move may make now, each one playTenka accepts. Placing is listed as one army or all still waiting, on each territory held, since any spread is a run of those. None once the game is over.
Examples
import { startTenka, tenkaMoves } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(tenkaMoves(game).slice(0,2));[
{ kind: 'place', territory: 0, armies: 1 },
{ kind: 'place', territory: 0, armies: 4 }
]What it prints (run when this page was built)