本文へ移動

Tenka天下

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

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

目次

リファレンス · ブラウザーの卓とSVG

TenkaDieHow型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

What a dressing is told about a die it is asked to draw.

インポート

import type { TenkaDieHow } from "@johnmorrisdotca/tenka/ui";

ほかのエクスポート元: @johnmorrisdotca/tenka/dressing

定義

type TenkaDieHow = {
    side: "attack" | "defend";
    tumble: boolean;
    index: number;
    count: number;
    label: string;
    locale: TenkaLocale;
};

メンバー

名前型説明
side"attack" | "defend"

Whose die it is: the attacker's or the defender's.

tumbleboolean

Whether the throw has only just been made, so that the die should be seen to land. False when the table is drawn again for any other reason.

indexnumber

Where the die stands among the dice of the throw, the attacker's first: 0 for the first.

countnumber

How many dice the throw had, both sides together: what a sound for the whole throw needs to know.

labelstring

What a screen reader says for the die, in the table's language: "Attacker's die: 4".

localeTenkaLocale

The table's language.

例

import type { TenkaDieHow } from "@johnmorrisdotca/tenka/ui";

const value: TenkaDieHow = {side:"attack",tumble:false,index:0,count:3,label:"Attack die",locale:"en"};
console.log(value);
{
  side: 'attack',
  tumble: false,
  index: 0,
  count: 3,
  label: 'Attack die',
  locale: 'en'
}

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

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

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