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

Ripple Effect rules

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

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

Ripple Effect has its own room and spacing model.

Exports

NameKindWhat it is
checkRipplefunctionChecks room permutations and the at-least-N-cell gap between equal N clues in a line.
decodeRipplefunctionRead a native saved Ripple game, or null for invalid board data or progress.
drawRipplefunctionRender the Ripple board and supplied current state as native SVG text.
encodeRipplefunctionEncode the Ripple board and current game as native resumable text.
generateRipplefunctionBuilds a seeded block-room family and accepts it only after a bounded uniqueness proof.
hintRipplefunctionOffers a cell only when the current public entries leave one proved completion.
isRippleBoardfunctionWhether the value has valid native Ripple dimensions, clues and data.
mountRipplefunctionMount the native Ripple player in a host element and return its cleanup and control handle.
newRipplefunctionCreate the initial immutable Ripple game from a valid board.
progressRipplefunctionPartial progress check; missing entries are allowed, but impossible room/ripple pairs are flagged.
RIPPLE_MAX_ATTEMPTSconstantThe native Ripple generation-attempt limit.
RIPPLE_MAX_NODESconstantThe native Ripple search-node budget.
RIPPLE_MAX_SIDEconstantThe maximum supported Ripple board dimension.
RIPPLE_MIN_SIDEconstantThe minimum supported Ripple board dimension.
RIPPLE_PLAY_STYLEconstantScoped native Ripple board and player CSS.
RIPPLE_STRINGSconstantNative English and Japanese labels and announcements for Ripple.
RippleBoardtypeRipple dimensions and printed clues in their native row-major representation.
RippleChecktypeThe Ripple completion result and cells that violate its native rules.
RippleDrawOptionstypeCurrent Ripple marks or entries, selection, errors and native SVG appearance choices.
rippleFinishedfunctionWhether this Ripple game satisfies its complete native rules.
RippleGametypeThe immutable Ripple board, current entries or marks, undo history and assistance state.
RippleLanguagetypeThe native English or Japanese display language for Ripple.
RippleMaterialtypeA supported material of the native Ripple board.
RippleMounttypeThe mounted Ripple game and progress, native controls and cleanup handle.
RippleMountOptionstypeThe initial Ripple board, native progress, appearance and host event callbacks.
RipplePiecestypeA supported native Ripple mark or piece appearance.
RipplePuzzletypeA seeded Ripple board with its verified solution.
rippleRoomSizesfunctionRead the size of each room in a Ripple Effect board.
RippleSolvetypeA bounded Ripple solve result: answer count, first solution, node work and whether the search completed.
setRippleValuefunctionApply the requested native Ripple entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
solveRipplefunctionCounts rule-valid fillings within an explicit node budget.
toggleRippleNotefunctionApply the requested native Ripple entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
undoRipplefunctionReturn the Ripple 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.