Skip to the content

Tenka天下

Play seeded world conquest for two to six, with dice battles, cards, computer players and saved games.

Tenka means the world under heaven in Japanese. About the name

Contents

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

NameTypeDescription
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.

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tenka 2.2.0.