Reference · Rules, maps and records
endOfTurnfunction
THE END OF A TURN: a card for a player who took a territory in it, then the next player still in. Passing the first player's place starts a new round, and past the last round the game is counted.
Import it
import { endOfTurn } from "@johnmorrisdotca/tenka";
Definition
function endOfTurn(game: TenkaGame): TenkaGame
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
Returns
TenkaGame
THE END OF A TURN: a card for a player who took a territory in it, then the next player still in. Passing the first player's place starts a new round, and past the last round the game is counted.
Examples
import { endOfTurn, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(endOfTurn(game).toPlay);0What it prints (run when this page was built)