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

Cagetype

A cage: the cells in it and the sum of the numbers inside.

Import it

import type { Cage } from "@johnmorrisdotca/kazu";

Definition

type Cage = {
    cells: number[];
    sum: number;
};

Members

NameTypeDescription
cellsnumber[]
sumnumber

Examples

import { decodeKiller } from "@johnmorrisdotca/kazu";
import type { Cage } from "@johnmorrisdotca/kazu";

const killer = decodeKiller("2.....3..2................2...4.....012333412567882967aaa9bbccd9ebfgggee02050c0d03020309080e0c0a06020b040a",6)!;
const value: Cage = killer.cages[0];
console.log(value);
{ cells: [ 0 ], sum: 2 }

What it prints (run when this page was built)

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