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

letGofunction

Letting go: a line of only its stone is no line (a tap on a stone clears it), and a line ends before a bridge it stopped on.

Import it

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

Definition

function letGo(lines: Lines, layout?: LinkLayout): Lines

Parameters

NameTypeDescription
linesLines

The native cell lists for every pair.

layout (optional)LinkLayout | undefined

The decoded native board and its rule settings.

Returns

Lines

Letting go: a line of only its stone is no line (a tap on a stone clears it), and a line ends before a bridge it stopped on.

Examples

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

const givens = TSUNAGI_4[0][0];
const layout = decodeLayout(givens,4)!;
const lines = noLines(layout);
console.log(letGo(lines,layout));
[ [], [], [], [] ]

What it prints (run when this page was built)

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