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

ChallengePacktype

Curated goal choices for one supported board shape.

Import it

import type { ChallengePack } from "@johnmorrisdotca/tobiishi";

Definition

type ChallengePack = Readonly<{
    title: Readonly<Record<"en" | "ja", string>>;
    shape: Shape;
    goals: readonly GoalHole[];
}>;

Members

NameTypeDescription
titleReadonly<Record<"en" | "ja", string>>
shapeShape
goalsreadonly Readonly<{ id: string; names: Readonly<Record<"en" | "ja", string>>; x: number; y: number; }>[]

Examples

import type { ChallengePack } from "@johnmorrisdotca/tobiishi";
import { TOBIISHI_CHALLENGE_PACKS } from "@johnmorrisdotca/tobiishi";

const value: ChallengePack = TOBIISHI_CHALLENGE_PACKS.english;
console.log(value);
{
  title: { en: 'Crossroads', ja: '交差点' },
  shape: 'english',
  goals: [
    { id: 'centre', names: [Object], x: 3, y: 3 },
    { id: 'north', names: [Object], x: 3, y: 2 },
    { id: 'west', names: [Object], x: 2, y: 3 }
  ]
}

What it prints (run when this page was built)

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