Skip to the content

Tsunagi繋ぎ

Join each pair with a separate line and fill the board, through fixed levels or seeded puzzles.

Tsunagi means joining in Japanese. About the name

Contents

Reference · Rules, solvers and generation

inHexfunction

Whether a cell of the square is inside the hexagon: at most R lattice steps from the middle.

Import it

import { inHex } from "@johnmorrisdotca/tsunagi";

Definition

function inHex(size: number, at: number): boolean

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

atnumber

The zero-based cell index.

Returns

boolean

Whether a cell of the square is inside the hexagon: at most R lattice steps from the middle.

Examples

import { inHex } from "@johnmorrisdotca/tsunagi";

console.log(inHex(7,24));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tsunagi 1.7.0.