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

TenkaRecordEntrytype

One move of a game's record, with what came of it: what the text and the CSV are written from.

Import it

import type { TenkaRecordEntry } from "@johnmorrisdotca/tenka";

Definition

type TenkaRecordEntry = {
    n: number;
    round: number;
    seat: TenkaSeat;
    move: TenkaMove;
    roll?: TenkaRoll;
    trade?: TenkaTrade;
    moved?: {
        from: number;
        to: number;
    };
    out?: TenkaSeat;
    drew?: boolean;
    winners?: readonly TenkaSeat[];
    counted?: boolean;
};

Members

NameTypeDescription
nnumber

The move's number, from 1.

roundnumber

The round it was made in.

seatnumber

The seat that made it.

moveTenkaMove

The move itself.

roll (optional)TenkaRoll | undefined

The dice of an attack: the one throw, or the last of a blitz with the losses of all of them.

trade (optional)TenkaTrade | undefined

The set traded in, what it was worth, and the territory that got two more.

moved (optional){ from: number; to: number; } | undefined

The two territories armies moved between: on the shift that carries out a fortifying move, and on the occupy that moves into a territory taken.

out (optional)number | undefined

The seat knocked out by this move.

drew (optional)boolean | undefined

Whether the move ended the turn with a card drawn.

winners (optional)readonly number[] | undefined

Whether the move ended the game, and who won.

counted (optional)boolean | undefined

Whether the game ended by the count of the last round (true) or by one player taking the world (false).

Examples

import type { TenkaRecordEntry } from "@johnmorrisdotca/tenka";

const value: TenkaRecordEntry = {n:1,round:1,seat:0,move:{kind:"endTurn"}};
console.log(value);
{ n: 1, round: 1, seat: 0, move: { kind: 'endTurn' } }

What it prints (run when this page was built)

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