TenkaElementOptionstype
Full native host options, including names and custom card/dice drawings.
Import it
import type { TenkaElementOptions } from "@johnmorrisdotca/tenka/element";
Also exported from: @johnmorrisdotca/tenka/element/define
Definition
type TenkaElementOptions = TenkaTableOptions;
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 { TenkaElementOptions } from "@johnmorrisdotca/tenka/element";
const options: TenkaElementOptions = { record: false, seed: 7 };
console.log(options.seed);7What it prints (run when this page was built)