Reference · Peg-solitaire element
TobiishiElementOptionstype
Host games, witnesses, palettes, external settings and the original persistence callback.
Import it
import type { TobiishiElementOptions } from "@johnmorrisdotca/tobiishi/element";
Also exported from: @johnmorrisdotca/tobiishi/element/define
Definition
type TobiishiElementOptions = MountOptions;
Members
| Name | Type | Description |
|---|---|---|
game (optional) | Readonly<{ board: Board; start: readonly boolean[]; pegs: readonly boolean[]; target: number | null; history: readonly Jump[]; helped: boolean; }> | undefined | |
challenge (optional) | Readonly<{ game: Game; answer: readonly Jump[]; seed: string; }> | undefined | |
shape (optional) | Shape | undefined | |
seed (optional) | string | undefined | |
challengeJumps (optional) | number | undefined | |
language (optional) | "en" | "ja" | undefined | |
material (optional) | Material | undefined | |
theme (optional) | Partial<Theme> | undefined | |
justBoard (optional) | boolean | undefined | |
settingsHost (optional) | HTMLElement | undefined | |
onChange (optional) | ((game: Game, code: string) => void) | undefined |
Examples
import type { TobiishiElementOptions } from "@johnmorrisdotca/tobiishi/element";
const options: TobiishiElementOptions = { material: "wood", language: "ja" };
console.log(options.material);woodWhat it prints (run when this page was built)