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

SVG boards and materials

import { … } from "@johnmorrisdotca/tobiishi/draw";

1.1 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
boundsOffunctionReturns the SVG view box size for the board.
drawfunctionA self-contained board drawing; no browser globals and no random SVG ids.
escapeXmlfunctionEscapes text for safe inclusion in XML attributes and content.
MaterialtypeBuilt-in board and peg palettes.
MATERIALSconstantBuilt-in palette names in player-menu order.
pointOffunctionMaps a board cell index to its SVG centre point.
ThemetypeSVG color properties that can be partially overridden by a caller.
THEMESconstantPalette values used by the SVG renderer.

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