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
| Name | Type | Description |
|---|---|---|
n | number | The move's number, from 1. |
round | number | The round it was made in. |
seat | number | The seat that made it. |
move | TenkaMove | 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 |
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)