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
| Name | Kind | What it is |
|---|---|---|
checkRipple | function | Checks room permutations and the at-least-N-cell gap between equal N clues in a line. |
decodeRipple | function | Read a native saved Ripple game, or null for invalid board data or progress. |
drawRipple | function | Render the Ripple board and supplied current state as native SVG text. |
encodeRipple | function | Encode the Ripple board and current game as native resumable text. |
generateRipple | function | Builds a seeded block-room family and accepts it only after a bounded uniqueness proof. |
hintRipple | function | Offers a cell only when the current public entries leave one proved completion. |
isRippleBoard | function | Whether the value has valid native Ripple dimensions, clues and data. |
mountRipple | function | Mount the native Ripple player in a host element and return its cleanup and control handle. |
newRipple | function | Create the initial immutable Ripple game from a valid board. |
progressRipple | function | Partial progress check; missing entries are allowed, but impossible room/ripple pairs are flagged. |
RIPPLE_MAX_ATTEMPTS | constant | The native Ripple generation-attempt limit. |
RIPPLE_MAX_NODES | constant | The native Ripple search-node budget. |
RIPPLE_MAX_SIDE | constant | The maximum supported Ripple board dimension. |
RIPPLE_MIN_SIDE | constant | The minimum supported Ripple board dimension. |
RIPPLE_PLAY_STYLE | constant | Scoped native Ripple board and player CSS. |
RIPPLE_STRINGS | constant | Native English and Japanese labels and announcements for Ripple. |
RippleBoard | type | Ripple dimensions and printed clues in their native row-major representation. |
RippleCheck | type | The Ripple completion result and cells that violate its native rules. |
RippleDrawOptions | type | Current Ripple marks or entries, selection, errors and native SVG appearance choices. |
rippleFinished | function | Whether this Ripple game satisfies its complete native rules. |
RippleGame | type | The immutable Ripple board, current entries or marks, undo history and assistance state. |
RippleLanguage | type | The native English or Japanese display language for Ripple. |
RippleMaterial | type | A supported material of the native Ripple board. |
RippleMount | type | The mounted Ripple game and progress, native controls and cleanup handle. |
RippleMountOptions | type | The initial Ripple board, native progress, appearance and host event callbacks. |
RipplePieces | type | A supported native Ripple mark or piece appearance. |
RipplePuzzle | type | A seeded Ripple board with its verified solution. |
rippleRoomSizes | function | Read the size of each room in a Ripple Effect board. |
RippleSolve | type | A bounded Ripple solve result: answer count, first solution, node work and whether the search completed. |
setRippleValue | function | Apply the requested native Ripple entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
solveRipple | function | Counts rule-valid fillings within an explicit node budget. |
toggleRippleNote | function | Apply the requested native Ripple entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
undoRipple | function | Return the Ripple game with its previous marks or entries restored, or unchanged when there is no undo history. |