Skip to the content

Tobiishi飛び石

Jump pegs on nine native boards, generate seeded solvable challenges and build a peg-solitaire player for your page.

Tobiishi is the Japanese word 飛び石 for stepping stones. About the name

Contents

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

NameTypeDescription
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);
wood

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tobiishi 0.3.1.