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

Explanation

How the board, engine and player fit together

Preserved architecture and the separation of proof, replay and drawing.

Architecture

src/
├── board.ts
├── challenges.ts
├── draw-entry.ts
├── draw.ts
├── element-define.ts
├── element.ts
├── game.ts
├── generate.ts
├── index.ts
├── mount.ts
├── play-entry.ts
├── solve.ts
└── strings.ts

The engine is board.ts (the lattice and every legal jump of a board, frozen), game.ts (a position and what a jump does to it), solve.ts (the bounded search), generate.ts (the backward growth of a challenge and the two classic starts) and challenges.ts (the 81 named challenges). draw.ts is the SVG and mount.ts the player, which uses both; strings.ts is its words. element.ts defines the tag and element-define.ts registers it as an effect of being imported. The three *-entry.ts and index.ts files are the package's entry points. None of the engine files touches the DOM.

Documentation and development

The shared generator reads the public TypeScript declarations and checks concrete examples. It builds paired references/guides, Markdown twins, llms files and local search. The demo server serves the same built docs beside the game; browser commands build the site before starting that server.

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