Reference · Rules, maps and records
marksForfunction
What the map lights up for a choice.
Import it
import { marksFor } from "@johnmorrisdotca/tenka";
Definition
function marksFor(game: TenkaGame, choice: TenkaChoice): TenkaMapMarks
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
choice | TenkaChoice | The current user-interface selection. |
Returns
TenkaMapMarks
What the map lights up for a choice.
Examples
import { marksFor, 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(marksFor(game,choice));{ chosen: null, reach: [], target: null }What it prints (run when this page was built)