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 · 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

NameTypeDescription
codestring

The native encoded clues, entries or notes specified by the signature.

sizenumber

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);
17

What it prints (run when this page was built)

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