Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

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

NameTypeDescription
gameTenkaGame

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);
0

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.2.0.