Reference · Browser table and SVG
TenkaDieHowtype
What a dressing is told about a die it is asked to draw.
Import it
import type { TenkaDieHow } from "@johnmorrisdotca/tenka/ui";
Also exported from: @johnmorrisdotca/tenka/dressing
Definition
type TenkaDieHow = {
side: "attack" | "defend";
tumble: boolean;
index: number;
count: number;
label: string;
locale: TenkaLocale;
};
Members
| Name | Type | Description |
|---|---|---|
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. |
Examples
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'
}What it prints (run when this page was built)