Reference · Number-puzzle engines
decodeKillerfunction
The cells and cages a code says, or null for one that is not a whole, well-formed puzzle: every cell named to a cage, every cage used, and a sum for each.
Import it
import { decodeKiller } from "@johnmorrisdotca/kazu";
Definition
function decodeKiller(code: string, size: number): { cells: number[]; cages: Cage[]; } | null
Parameters
| Name | Type | Description |
|---|---|---|
code | string | The native encoded clues, entries or notes specified by the signature. |
size | number | The supported square grid side length. |
Returns
{ cells: number[]; cages: Cage[]; } | null
The cells and cages a code says, or null for one that is not a whole, well-formed puzzle: every cell named to a cage, every cage used, and a sum for each.
Examples
import { decodeKiller } from "@johnmorrisdotca/kazu";
console.log(decodeKiller("2.....3..2................2...4.....012333412567882967aaa9bbccd9ebfgggee02050c0d03020309080e0c0a06020b040a",6)?.cages.length);17What it prints (run when this page was built)