Reference · Rules, maps and records
beginTurnfunction
A turn starting for seat: its armies worked out, nothing yet taken, nothing rolled.
Import it
import { beginTurn } from "@johnmorrisdotca/tenka";
Definition
function beginTurn(game: TenkaGame, seat: TenkaSeat, round: number): TenkaGame
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
seat | number | The zero-based player seat. |
round | number | The round number of the turn. |
Returns
TenkaGame
A turn starting for seat: its armies worked out, nothing yet taken, nothing rolled.
Examples
import { beginTurn, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(beginTurn(game,0,2).round);2What it prints (run when this page was built)