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

Heyawake rules

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

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

Heyawake has its own room model alongside Kazu's number puzzles.

Exports

NameKindWhat it is
checkHeyawakefunctionValidate a Heyawake answer against the printed clues and complete native rules.
checkRoomSpansfunctionAdd unshaded straight-line room-span violations to the supplied error set.
decodeHeyawakefunctionRead a native saved Heyawake game, or null for invalid board data or progress.
drawHeyawakefunctionRender the Heyawake board and supplied current state as native SVG text.
encodeHeyawakefunctionEncode the Heyawake board and current game as native resumable text.
generateHeyawakefunctionGenerate a seeded Heyawake puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw.
HEYAWAKE_GENERATOR_MOST_CELLSconstantThe maximum number of cells accepted by the Heyawake generator.
HEYAWAKE_LEVELSconstantThe native Heyawake generation difficulty tiers.
HEYAWAKE_MOST_ATTEMPTSconstantThe native Heyawake generation-attempt limit.
HEYAWAKE_MOST_NODESconstantThe native Heyawake search-node budget.
HEYAWAKE_MOST_SIDEconstantThe maximum supported Heyawake board dimension.
HEYAWAKE_PLAY_STYLEconstantScoped native Heyawake board and player CSS.
HeyawakeAppearancetypeLanguage, material and marks for a native Heyawake board.
HeyawakeBoardtypeHeyawake dimensions and printed clues in their native row-major representation.
heyawakeCellsfunctionRead room cells, or null for a room outside this board.
HeyawakeChecktypeThe Heyawake completion result and cells that violate its native rules.
HeyawakeDrawOptionstypeCurrent Heyawake marks or entries, selection, errors and native SVG appearance choices.
heyawakeFinishedfunctionWhether this Heyawake game satisfies its complete native rules.
HeyawakeGametypeThe immutable Heyawake board, current entries or marks, undo history and assistance state.
HeyawakeLeveltypeA native difficulty tier for generated Heyawake puzzles.
HeyawakeMounttypeThe mounted Heyawake game and progress, native controls and cleanup handle.
HeyawakeMountOptionstypeThe initial Heyawake board, native progress, appearance and host event callbacks.
heyawakeNeighboursfunctionRead orthogonally adjacent Heyawake cells.
HeyawakePuzzletypeA seeded Heyawake board with its verified solution and native difficulty tier.
HeyawakeRoomtypeA rectangular room and its optional required black-cell count.
HeyawakeSolvetypeA bounded Heyawake solve result: answer count, first solution, node work and whether the search completed.
heyawakeWordsfunctionRead the native English or Japanese Heyawake labels.
hintHeyawakefunctionFind a native Heyawake hint, or null when no actionable hint is available.
isHeyawakeBoardfunctionWhether the value has valid native Heyawake dimensions, clues and data.
mountHeyawakefunctionMount the native Heyawake player in a host element and return its cleanup and control handle.
newHeyawakefunctionCreate the initial immutable Heyawake game from a valid board.
restartHeyawakefunctionReturn the Heyawake game reset to its initial entries or marks.
roomForCellfunctionRead the containing room index for each Heyawake cell.
setHeyawakeCellfunctionApply the requested native Heyawake entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
solveHeyawakefunctionSearch for Heyawake answers up to the solution and node limits; completion distinguishes a proved result from exhausted work.
undoHeyawakefunctionReturn the Heyawake game with its previous marks or entries restored, or unchanged when there is no undo history.

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