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
| Name | Type | Description |
|---|---|---|
board | NurikabeBoard | 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"));trueWhat it prints (run when this page was built)