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

boxedLayoutfunction

Rows, columns and boxes; with diagonal, the two long diagonals as well.

Import it

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

Definition

function boxedLayout(size: number, diagonal?: boolean): Layout

Parameters

NameTypeDescription
sizenumber

The supported square grid side length.

diagonal (optional)boolean

Whether to include both long diagonal groups.

Returns

Layout

Rows, columns and boxes; with diagonal, the two long diagonals as well.

Examples

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

console.log(boxedLayout(4).groups.length);
12

What it prints (run when this page was built)

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