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

tenkaMovesfunction

Every move the player to move may make now, each one playTenka accepts. Placing is listed as one army or all still waiting, on each territory held, since any spread is a run of those. None once the game is over.

Import it

import { tenkaMoves } from "@johnmorrisdotca/tenka";

Definition

function tenkaMoves(game: TenkaGame): TenkaMove[]

Parameters

NameTypeDescription
gameTenkaGame

The current native game state.

Returns

TenkaMove[]

Every move the player to move may make now, each one playTenka accepts. Placing is listed as one army or all still waiting, on each territory held, since any spread is a run of those. None once the game is over.

Examples

import { startTenka, tenkaMoves } from "@johnmorrisdotca/tenka";

const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(tenkaMoves(game).slice(0,2));
[
  { kind: 'place', territory: 0, armies: 1 },
  { kind: 'place', territory: 0, armies: 4 }
]

What it prints (run when this page was built)

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