TenkaRecordEntry型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One move of a game's record, with what came of it: what the text and the CSV are written from.
インポート
import type { TenkaRecordEntry } from "@johnmorrisdotca/tenka";
定義
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;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
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 (省略可) | TenkaRoll | undefined | The dice of an attack: the one throw, or the last of a blitz with the losses of all of them. |
trade (省略可) | TenkaTrade | undefined | The set traded in, what it was worth, and the territory that got two more. |
moved (省略可) | { from: number; to: number; } | undefined | The two territories armies moved between: on the |
out (省略可) | number | undefined | The seat knocked out by this move. |
drew (省略可) | boolean | undefined | Whether the move ended the turn with a card drawn. |
winners (省略可) | readonly number[] | undefined | Whether the move ended the game, and who won. |
counted (省略可) | boolean | undefined | Whether the game ended by the count of the last round (true) or by one player taking the world (false). |
例
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' } }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。