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

TRIANGLE_STEPSconstant

Six jump directions used by the triangular lattice.

Import it

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

Definition

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

Examples

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

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

What it prints (run when this page was built)

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