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

edgeModelfunction

A layout written down as clauses (see the top of this file), or null where it cannot be solved at all: a stone its pair does not name, or a cell with too few ways in and out to hold a line.

Import it

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

Definition

function edgeModel(layout: LinkLayout, colours?: SatColours): EdgeModel | null

Parameters

NameTypeDescription
layoutLinkLayout

The decoded native board and its rule settings.

colours (optional)SatColours

The palette or SAT colour encoding specified by the signature.

Returns

EdgeModel | null

The SAT edge model, or null when the layout cannot support a complete solution.

Examples

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

const givens = TSUNAGI_4[0][0];
const layout = decodeLayout(givens,4)!;
console.log(edgeModel(layout)?.total);
16

What it prints (run when this page was built)

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