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

How-to

Choose named goal packs

Pick a real pack goal and understand witness-length difficulty labels.

Choose a native goal

import { TOBIISHI_CHALLENGE_PACKS,generateTobiishiChallenge } from "@johnmorrisdotca/tobiishi";
const pack=TOBIISHI_CHALLENGE_PACKS.english;
const challenge=generateTobiishiChallenge("english",pack.goals[0].id,"easy");
console.log(pack.title.en,challenge.goal.id,challenge.answer.length,challenge.seed);
Crossroads centre 3 tobiishi-pack:english:centre:easy

Nine shapes each have three curated goal holes and three requested length categories, making 81 named combinations. Easy/medium/hard request 3/6/9 jumps; they are witness-length categories rather than a measured human difficulty rating. The seed incorporates pack, goal and category.

Keep a goal on its board

A goal carries native integer coordinates and localized labels. The generator validates that it is a real hole, and throws for an unknown pack/goal/category or a challenge that does not reach the intended length. Use the pack’s own goal choices when building a menu; do not reuse another shape’s coordinates.

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