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 · Number-puzzle engines

TOWER_SIDESconstant

Towers (Skyscrapers) as a string: the cells, then the clues around the edge.

The cells come first, row-major, as every number grid is written (. for empty; most puzzles print none). Then one character for every place a clue can stand outside the square, four sides of size: along the top left to right, along the bottom left to right, down the left top to bottom, down the right top to bottom. A digit is how many towers can be seen from there; . is no clue. A 7×7 is 49 + 28 characters.

Import it

import { TOWER_SIDES } from "@johnmorrisdotca/kazu";

Definition

const TOWER_SIDES: readonly ["top", "bottom", "left", "right"] = ["top", "bottom", "left", "right"] as const

Examples

import { TOWER_SIDES } from "@johnmorrisdotca/kazu";
console.log(TOWER_SIDES);
[ 'top', 'bottom', 'left', 'right' ]

What it prints (run when this page was built)

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