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

hintNurikabefunction

Find a native Nurikabe hint, or null when no actionable hint is available.

Import it

import { hintNurikabe } from "@johnmorrisdotca/kazu/nurikabe";

Also exported from: @johnmorrisdotca/kazu

Definition

function hintNurikabe(game: NurikabeGame): number | null

Parameters

NameTypeDescription
gameNurikabeGame

The current immutable game state.

Returns

number | null

Find a native Nurikabe hint, or null when no actionable hint is available.

Examples

import type { NurikabeBoard } from "@johnmorrisdotca/kazu/nurikabe";
import { hintNurikabe, newNurikabe } from "@johnmorrisdotca/kazu/nurikabe";

const nurikabeBoard: NurikabeBoard = {"size":5,"clues":[1,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,2,0,0,3,0,0]};
const nurikabeGame = newNurikabe(nurikabeBoard);
console.log(hintNurikabe(nurikabeGame));
1

What it prints (run when this page was built)

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