Reference · Browser table and SVG
TenkaTableOptionstype
Native table settings; defaults to three players, with two computers.
Import it
import type { TenkaTableOptions } from "@johnmorrisdotca/tenka/ui";
Definition
type TenkaTableOptions = {
players?: readonly string[];
computers?: readonly boolean[];
rounds?: number;
seed?: number;
map?: TenkaMapKey;
colours?: readonly string[];
computerDelayMs?: number;
onChange?: (game: TenkaGame) => void;
locale?: TenkaLocale;
strings?: Partial<TenkaStrings>;
theme?: Readonly<Record<string, string>>;
record?: boolean;
dressing?: TenkaDressing;
};
Members
| Name | Type | Description |
|---|---|---|
players (optional) | readonly string[] | undefined | The names round the table, in seat order: two to six. |
computers (optional) | readonly boolean[] | undefined | Which seats the computer plays. By default every seat but the first. |
rounds (optional) | number | undefined | Rounds before the count: 10, 20, or 60 for the whole world. |
seed (optional) | number | undefined | The seed every deal and die is drawn from; a new one each game when absent. |
map (optional) | TenkaMapKey | undefined | The map: |
colours (optional) | readonly string[] | undefined | A colour for each seat. |
computerDelayMs (optional) | number | undefined | How long the computer waits before each of its moves, in milliseconds. |
onChange (optional) | ((game: TenkaGame) => void) | undefined | Told of every game after a move. |
locale (optional) | TenkaLocale | undefined | The language of the table: |
strings (optional) | Partial<TenkaStrings> | undefined | Words of your own, laid over the locale's: any of |
theme (optional) | Readonly<Record<string, string>> | undefined | CSS variables set on the table itself, which win in light and dark alike: |
record (optional) | boolean | undefined | Whether the table shows the record of the game, with saving and loading. True by default. |
dressing (optional) | TenkaDressing | undefined | How the dice and the cards are drawn, if not the plain way: |
Examples
import type { TenkaTableOptions } from "@johnmorrisdotca/tenka/ui";
const options: TenkaTableOptions = { seed: 7, record: false };
console.log(options.seed);7What it prints (run when this page was built)