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. |
tumble | boolean | 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. |
index | number | Where the die stands among the dice of the throw, the attacker's first: 0 for the first. |
count | number | How many dice the throw had, both sides together: what a sound for the whole throw needs to know. |
label | string | What a screen reader says for the die, in the table's language: "Attacker's die: 4". |
locale | TenkaLocale | 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'
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。