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

SQUARE_STEPSconstant

Orthogonal direction steps used by square-lattice boards.

Import it

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

Definition

const SQUARE_STEPS: readonly [readonly [1, 0], readonly [-1, 0], readonly [0, 1], readonly [0, -1]] = [
    [1, 0],
    [-1, 0],
    [0, 1],
    [0, -1],
] as const

Examples

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

console.log(SQUARE_STEPS);
[ [ 1, 0 ], [ -1, 0 ], [ 0, 1 ], [ 0, -1 ] ]

What it prints (run when this page was built)

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