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 · Boards, rules and challenges

boardOffunction

A familiar lattice or a shaped outline. Shapes describe holes, never a different capture rule.

Import it

import { boardOf } from "@johnmorrisdotca/tobiishi";

Definition

function boardOf(shape?: Shape): Board

Parameters

NameTypeDescription
shape (optional)Shape

One of the built-in SHAPES.

Returns

Readonly<{ name: string; lattice: "square" | "triangle"; cells: readonly Cell[]; jumps: readonly Jump[]; }>

A familiar lattice or a shaped outline. Shapes describe holes, never a different capture rule.

Examples

import { boardOf } from "@johnmorrisdotca/tobiishi";

console.log(boardOf("triangle").cells.length);
15

What it prints (run when this page was built)

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