Reference
Yajilin rules
import { … } from "@johnmorrisdotca/kazu/yajilin";
3.2 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
checkYajilin | function | Validate a Yajilin answer against the printed clues and complete native rules. |
decodeYajilin | function | Read a native saved Yajilin game, or null for invalid board data or progress. |
encodeYajilin | function | Encode the Yajilin board and current game as native resumable text. |
generateYajilin | function | Seeded original 5×5 families, accepted only after a completed uniqueness proof. |
hintYajilin | function | Find a native Yajilin hint, or null when no actionable hint is available. |
isYajilinBoard | function | Whether the value has valid native Yajilin dimensions, clues and data. |
newYajilin | function | Create the initial immutable Yajilin game from a valid board. |
restartYajilin | function | Return the Yajilin game reset to its initial entries or marks. |
solveYajilin | function | Counts public shade patterns whose remaining cells form the single required loop. |
toggleYajilinEdge | function | Apply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
toggleYajilinShade | function | Apply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
undoYajilin | function | Return the Yajilin game with its previous marks or entries restored, or unchanged when there is no undo history. |
YAJILIN_NODE_BUDGET | constant | The native Yajilin search-node budget. |
YAJILIN_SIZES | constant | The supported Yajilin board sizes. |
YajilinBoard | type | Yajilin dimensions and printed clues in their native row-major representation. |
YajilinCheck | type | The Yajilin completion result and cells that violate its native rules. |
YajilinClue | type | An arrow direction and the required number of shaded cells in its ray. |
YajilinDirection | type | The direction an arrow clue looks along a row or column. |
YajilinDrawOptions | type | Current Yajilin marks or entries, selection, errors and native SVG appearance choices. |
yajilinEdgeCount | function | Count native Yajilin edges. |
YajilinGame | type | The immutable Yajilin board, current entries or marks, undo history and assistance state. |
YajilinMount | type | The mounted Yajilin game and progress, native controls and cleanup handle. |
YajilinMountOptions | type | The initial Yajilin board, native progress, appearance and host event callbacks. |
yajilinNeighbors | function | Read adjacent Yajilin cells and the joining edge. |
YajilinPuzzle | type | A seeded Yajilin board with its verified solution. |
yajilinRay | function | Read cells in the arrow’s indicated direction, excluding its own clue cell. |
YajilinSolution | type | The solved Yajilin shading and loop edges. |
YajilinSolve | type | A bounded Yajilin solve result: answer count, first solution, node work and whether the search completed. |