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 SVG

drawNurikabefunction

SVG text contains the numbered clues and the player's sea marks only.

Import it

import { drawNurikabe } from "@johnmorrisdotca/kazu/nurikabe/draw";

Definition

function drawNurikabe(board: NurikabeBoard, options?: NurikabeDrawOptions): string

Parameters

NameTypeDescription
boardNurikabeBoard

The valid native board with its printed clues and dimensions.

options (optional)NurikabeDrawOptions

Solution/node limits or native SVG choices specified by the signature.

Returns

string

SVG text contains the numbered clues and the player's sea marks only.

Examples

import type { NurikabeBoard } from "@johnmorrisdotca/kazu/nurikabe";
import { drawNurikabe } from "@johnmorrisdotca/kazu/nurikabe/draw";

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]};
console.log(drawNurikabe(nurikabeBoard).startsWith("<svg"));
true

What it prints (run when this page was built)

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