Reference · Rules, maps and records
choiceNowfunction
A choice made on an earlier map, read against this one: only what still stands, and a number of armies the move can take.
Import it
import { choiceNow } from "@johnmorrisdotca/tenka";
Definition
function choiceNow(game: TenkaGame, choice: TenkaChoice): TenkaChoice
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
choice | TenkaChoice | The current user-interface selection. |
Returns
TenkaChoice
A choice made on an earlier map, read against this one: only what still stands, and a number of armies the move can take.
Examples
import { choiceNow, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
const choice = {from:null,to:null,armies:1,placedOn:null};
console.log(choiceNow(game,choice));{ from: null, to: null, armies: 0, placedOn: null }What it prints (run when this page was built)