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

playTenkafunction

The game after the player to move makes move, or null when they may not: a move for another phase, a territory not theirs, a neighbour that is not one, dice they have not the armies for, a set that is not a set.

Import it

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

Definition

function playTenka(game: TenkaGame, move: TenkaMove): TenkaGame | null

Parameters

NameTypeDescription
gameTenkaGame

The current native game state.

moveTenkaMove

The native move to apply or encode.

Returns

TenkaGame | null

The new game, or null when the move is not legal in the current phase.

Examples

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

const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(playTenka(game,tenkaMoves(game)[0])?.moves.length);
1

What it prints (run when this page was built)

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