Reference · Browser table and SVG
TenkaCardHowtype
What a dressing is told about a card it is asked to draw.
Import it
import type { TenkaCardHow } from "@johnmorrisdotca/tenka/ui";
Also exported from: @johnmorrisdotca/tenka/dressing
Definition
type TenkaCardHow = {
card: number;
territory: number | null;
kind: TenkaCardKind;
map: TenkaMapKey;
name: string;
label: string;
locale: TenkaLocale;
};
Members
| Name | Type | Description |
|---|---|---|
card | number | The card's number: 0 and up the territories', then the two wild cards. |
territory | number | null | The territory it shows, or null for a wild card. |
kind | TenkaCardKind | Land, sea or air; or wild. |
map | TenkaMapKey | The map the game is on, which decides what the territory looks like. |
name | string | The territory's name in the table's language, or the word for a wild card. |
label | string | What a screen reader says for the card, in the table's language: "Land: Brazil". |
locale | TenkaLocale | The table's language. |
Examples
import type { TenkaCardHow } from "@johnmorrisdotca/tenka/ui";
const value: TenkaCardHow = {card:0,territory:0,kind:"land",map:"world",name:"Alaska",label:"Alaska",locale:"en"};
console.log(value);{
card: 0,
territory: 0,
kind: 'land',
map: 'world',
name: 'Alaska',
label: 'Alaska',
locale: 'en'
}What it prints (run when this page was built)