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

KazuPuzzletype

One puzzle, made from a seed or read back from its codes. givens and solution are the strings cells.ts and the kinds' own codes write: row-major cells, one character each, and for a Jigsaw, Sum Cages, More or Less or Towers the rest of what the puzzle is printed with, after the cells.

Import it

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

Definition

type KazuPuzzle = {
    kind: KazuKind;
    size: number;
    level: KazuLevel;
    seed: number;
    givens: string;
    solution: string;
};

Members

NameTypeDescription
kind"number-place" | "jigsaw" | "diagonal" | "sum-cages" | "more-or-less" | "towers"
sizenumber
level"easy" | "medium" | "hard"
seednumber
givensstring
solutionstring

Examples

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

const puzzle: KazuPuzzle = {"kind":"number-place","size":4,"level":"easy","seed":42,"givens":"14..2..1412.3..4","solution":"1432234141233214"};
const value: KazuPuzzle = puzzle;
console.log(value);
{
  kind: 'number-place',
  size: 4,
  level: 'easy',
  seed: 42,
  givens: '14..2..1412.3..4',
  solution: '1432234141233214'
}

What it prints (run when this page was built)

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