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
| Name | Kind | What it is |
|---|---|---|
checkHeyawake | function | Validate a Heyawake answer against the printed clues and complete native rules. |
checkRoomSpans | function | Add unshaded straight-line room-span violations to the supplied error set. |
decodeHeyawake | function | Read a native saved Heyawake game, or null for invalid board data or progress. |
drawHeyawake | function | Render the Heyawake board and supplied current state as native SVG text. |
encodeHeyawake | function | Encode the Heyawake board and current game as native resumable text. |
generateHeyawake | function | Generate a seeded Heyawake puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw. |
HEYAWAKE_GENERATOR_MOST_CELLS | constant | The maximum number of cells accepted by the Heyawake generator. |
HEYAWAKE_LEVELS | constant | The native Heyawake generation difficulty tiers. |
HEYAWAKE_MOST_ATTEMPTS | constant | The native Heyawake generation-attempt limit. |
HEYAWAKE_MOST_NODES | constant | The native Heyawake search-node budget. |
HEYAWAKE_MOST_SIDE | constant | The maximum supported Heyawake board dimension. |
HEYAWAKE_PLAY_STYLE | constant | Scoped native Heyawake board and player CSS. |
HeyawakeAppearance | type | Language, material and marks for a native Heyawake board. |
HeyawakeBoard | type | Heyawake dimensions and printed clues in their native row-major representation. |
heyawakeCells | function | Read room cells, or null for a room outside this board. |
HeyawakeCheck | type | The Heyawake completion result and cells that violate its native rules. |
HeyawakeDrawOptions | type | Current Heyawake marks or entries, selection, errors and native SVG appearance choices. |
heyawakeFinished | function | Whether this Heyawake game satisfies its complete native rules. |
HeyawakeGame | type | The immutable Heyawake board, current entries or marks, undo history and assistance state. |
HeyawakeLevel | type | A native difficulty tier for generated Heyawake puzzles. |
HeyawakeMount | type | The mounted Heyawake game and progress, native controls and cleanup handle. |
HeyawakeMountOptions | type | The initial Heyawake board, native progress, appearance and host event callbacks. |
heyawakeNeighbours | function | Read orthogonally adjacent Heyawake cells. |
HeyawakePuzzle | type | A seeded Heyawake board with its verified solution and native difficulty tier. |
HeyawakeRoom | type | A rectangular room and its optional required black-cell count. |
HeyawakeSolve | type | A bounded Heyawake solve result: answer count, first solution, node work and whether the search completed. |
heyawakeWords | function | Read the native English or Japanese Heyawake labels. |
hintHeyawake | function | Find a native Heyawake hint, or null when no actionable hint is available. |
isHeyawakeBoard | function | Whether the value has valid native Heyawake dimensions, clues and data. |
mountHeyawake | function | Mount the native Heyawake player in a host element and return its cleanup and control handle. |
newHeyawake | function | Create the initial immutable Heyawake game from a valid board. |
restartHeyawake | function | Return the Heyawake game reset to its initial entries or marks. |
roomForCell | function | Read the containing room index for each Heyawake cell. |
setHeyawakeCell | function | Apply the requested native Heyawake entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
solveHeyawake | function | Search for Heyawake answers up to the solution and node limits; completion distinguishes a proved result from exhausted work. |
undoHeyawake | function | Return the Heyawake game with its previous marks or entries restored, or unchanged when there is no undo history. |