Skip to the content

Kazu数

Generate checked Sudoku and logic puzzles, read native rules and hints, and draw or embed playable boards.

Kazu is the Japanese word 数 for number. About the name

Contents

Reference

Yajilin rules

import { … } from "@johnmorrisdotca/kazu/yajilin";

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

Exports

NameKindWhat it is
checkYajilinfunctionValidate a Yajilin answer against the printed clues and complete native rules.
decodeYajilinfunctionRead a native saved Yajilin game, or null for invalid board data or progress.
encodeYajilinfunctionEncode the Yajilin board and current game as native resumable text.
generateYajilinfunctionSeeded original 5×5 families, accepted only after a completed uniqueness proof.
hintYajilinfunctionFind a native Yajilin hint, or null when no actionable hint is available.
isYajilinBoardfunctionWhether the value has valid native Yajilin dimensions, clues and data.
newYajilinfunctionCreate the initial immutable Yajilin game from a valid board.
restartYajilinfunctionReturn the Yajilin game reset to its initial entries or marks.
solveYajilinfunctionCounts public shade patterns whose remaining cells form the single required loop.
toggleYajilinEdgefunctionApply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
toggleYajilinShadefunctionApply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
undoYajilinfunctionReturn the Yajilin game with its previous marks or entries restored, or unchanged when there is no undo history.
YAJILIN_NODE_BUDGETconstantThe native Yajilin search-node budget.
YAJILIN_SIZESconstantThe supported Yajilin board sizes.
YajilinBoardtypeYajilin dimensions and printed clues in their native row-major representation.
YajilinChecktypeThe Yajilin completion result and cells that violate its native rules.
YajilinCluetypeAn arrow direction and the required number of shaded cells in its ray.
YajilinDirectiontypeThe direction an arrow clue looks along a row or column.
YajilinDrawOptionstypeCurrent Yajilin marks or entries, selection, errors and native SVG appearance choices.
yajilinEdgeCountfunctionCount native Yajilin edges.
YajilinGametypeThe immutable Yajilin board, current entries or marks, undo history and assistance state.
YajilinMounttypeThe mounted Yajilin game and progress, native controls and cleanup handle.
YajilinMountOptionstypeThe initial Yajilin board, native progress, appearance and host event callbacks.
yajilinNeighborsfunctionRead adjacent Yajilin cells and the joining edge.
YajilinPuzzletypeA seeded Yajilin board with its verified solution.
yajilinRayfunctionRead cells in the arrow’s indicated direction, excluding its own clue cell.
YajilinSolutiontypeThe solved Yajilin shading and loop edges.
YajilinSolvetypeA bounded Yajilin solve result: answer count, first solution, node work and whether the search completed.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kazu 2.1.0.