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

choiceNowfunction

A choice made on an earlier map, read against this one: only what still stands, and a number of armies the move can take.

Import it

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

Definition

function choiceNow(game: TenkaGame, choice: TenkaChoice): TenkaChoice

Parameters

NameTypeDescription
gameTenkaGame

The current native game state.

choiceTenkaChoice

The current user-interface selection.

Returns

TenkaChoice

A choice made on an earlier map, read against this one: only what still stands, and a number of armies the move can take.

Examples

import { choiceNow, 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(choiceNow(game,choice));
{ from: null, to: null, armies: 0, placedOn: null }

What it prints (run when this page was built)

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