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

boxOffunction

The box a cell is in, numbered row-major from 0.

Import it

import { boxOf } from "@johnmorrisdotca/kazu";

Definition

function boxOf(size: number, index: number): number

Parameters

NameTypeDescription
sizenumber

The supported square grid side length.

indexnumber

The zero-based row-major cell index.

Returns

number

The box a cell is in, numbered row-major from 0.

Examples

import { boxOf } from "@johnmorrisdotca/kazu";

console.log(boxOf(6,12));
2

What it prints (run when this page was built)

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