本文へ移動

Tenka天下

2〜6人で、シードから始まる世界征服ゲームを遊べます。さいころでの戦い、カード、コンピューターの相手、ゲームの保存に対応します。

「天下」は、天の下に広がる世界を表す言葉です。 名前について(英語)

目次

リファレンス · ルール・地図・棋譜

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;
};

メンバー

名前型説明
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 (省略可)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 shift that carries out a fortifying move, and on the occupy that moves into a territory taken.

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' } }

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/tenka 2.2.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。