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 player

NurikabeMountOptionstype

The initial Nurikabe board, native progress, appearance and host event callbacks.

Import it

import type { NurikabeMountOptions } from "@johnmorrisdotca/kazu/nurikabe/play";

Definition

type NurikabeMountOptions = NurikabeDrawOptions & {
    board: NurikabeBoard;
    progress?: string;
    onChange?: (game: NurikabeGame) => void;
    onFinish?: (game: NurikabeGame) => void;
};

Members

NameTypeDescription
sea (optional)readonly boolean[] | undefined
selected (optional)number | null | undefined
errors (optional)readonly number[] | undefined
material (optional)NurikabeMaterial | undefined
pieces (optional)NurikabePieces | undefined
language (optional)NurikabeLanguage | undefined
boardNurikabeBoard
progress (optional)string | undefined
onChange (optional)((game: NurikabeGame) => void) | undefined
onFinish (optional)((game: NurikabeGame) => void) | undefined

Examples

import type { NurikabeBoard } from "@johnmorrisdotca/kazu/nurikabe";
import type { NurikabeMountOptions } from "@johnmorrisdotca/kazu/nurikabe/play";

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 value: NurikabeMountOptions = {board:nurikabeBoard};
console.log(value);
{
  board: {
    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
    ]
  }
}

What it prints (run when this page was built)

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