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

generateHeyawakefunction

Generate a seeded Heyawake puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw.

Import it

import { generateHeyawake } from "@johnmorrisdotca/kazu/heyawake";

Also exported from: @johnmorrisdotca/kazu

Definition

function generateHeyawake(width?: number, height?: number, level?: HeyawakeLevel, seed?: number): HeyawakePuzzle

Parameters

NameTypeDescription
width (optional)number

The supported board width in cells.

height (optional)number

The supported board height in cells.

level (optional)HeyawakeLevel

The requested native difficulty tier.

seed (optional)number

The reproducible native puzzle seed.

Returns

HeyawakePuzzle

Generate a seeded Heyawake puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw.

Examples

import { generateHeyawake } from "@johnmorrisdotca/kazu/heyawake";

console.log(generateHeyawake(5,5,"easy",42));

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