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

onTheBoardfunction

Whether a cell is on the board: every cell of a whole square, the hexagon's own of a plain hexagon, and those a shape keeps.

Import it

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

Definition

function onTheBoard(layout: LinkLayout, at: number): boolean

Parameters

NameTypeDescription
layoutLinkLayout

The decoded native board and its rule settings.

atnumber

The zero-based cell index.

Returns

boolean

Whether the cell is on the board.

Examples

import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { decodeLayout, onTheBoard } from "@johnmorrisdotca/tsunagi";

console.log(onTheBoard(decodeLayout(TSUNAGI_4[0][0],4)!,0));
true

What it prints (run when this page was built)

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