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

shapedBoardfunction

A board of any outline: every cell of the square keep says yes to, and the rest off the board. A hole in the middle reads as blocked cells, since it does not reach the edge (offBoardCells).

Import it

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

Definition

function shapedBoard(size: number, keep: (at: number) => boolean, more?: { hex?: boolean; }): TsunagiBoard

Parameters

NameTypeDescription
sizenumber

The side of the square it is written in.

keep(at: number) => boolean

Whether a cell is on the board.

more (optional){ hex?: boolean; }

Whether it is a honeycomb.

Returns

TsunagiBoard

The board as a graph.

Examples

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

console.log(shapedBoard(5,(at)=>at%5!==2||at>=10).cells.length);
23

What it prints (run when this page was built)

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