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

lineFromfunction

The cells a clue looks along, nearest first: the clue at at on the top looks down column at, on the bottom up it, on the left along row at to the right, on the right along it to the left.

Import it

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

Definition

function lineFrom(side: TowerSide, at: number, size: number): number[]

Parameters

NameTypeDescription
side"right" | "left" | "top" | "bottom"

The top, bottom, left or right clue side.

atnumber

The zero-based clue index along the named side.

sizenumber

The supported square grid side length.

Returns

number[]

The cells a clue looks along, nearest first: the clue at at on the top looks down column at, on the bottom up it, on the left along row at to the right, on the right along it to the left.

Examples

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

console.log(lineFrom("top",0,4));
[ 0, 4, 8, 12 ]

What it prints (run when this page was built)

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