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

squareBoardfunction

A square board, its edges joined if wrap, with any blocked cells.

Import it

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

Definition

function squareBoard(side: number, more?: { wrap?: boolean; blocked?: ReadonlySet<number>; }): TsunagiBoard

Parameters

NameTypeDescription
sidenumber

The number of cells on each side.

more (optional){ wrap?: boolean; blocked?: ReadonlySet<number>; }

Whether the edges join, and the cells no line enters.

Returns

TsunagiBoard

The board as a graph.

Examples

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

console.log(squareBoard(5,{wrap:true}).around[0]);
[ 20, 1, 5, 4 ]

What it prints (run when this page was built)

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