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

replayTenkafunction

A game made again from its table and its moves, or null if any move could not have been made when it was.

Import it

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

Definition

function replayTenka(table: { rounds: number; players: readonly string[]; seed: number; placing: TenkaPlacing; map?: TenkaMapKey; }, moves: readonly TenkaMove[]): TenkaGame | null

Parameters

NameTypeDescription
table{ rounds: number; players: readonly string[]; seed: number; placing: TenkaPlacing; map?: TenkaMapKey; }

The original round limit, players, seed, placement and map.

movesreadonly TenkaMove[]

The native moves in chronological order.

Returns

TenkaGame | null

The replayed game, or null for invalid setup or any refused move.

Examples

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

console.log(replayTenka({rounds:10,players:["Seat 1","Seat 2"],seed:42,placing:"auto"},[] )?.seed);
42

What it prints (run when this page was built)

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