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

encodeWallsfunction

The walls as a layout writes them, after the cells: nothing where there are none.

Import it

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

Definition

function encodeWalls(walls: Iterable<string>): string

Parameters

NameTypeDescription
wallsIterable<string>

The blocked undirected edges as a-b strings.

Returns

string

The walls as a layout writes them, after the cells: nothing where there are none.

Examples

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

console.log(encodeWalls(new Set(["1-2","1-5"])));
|1-2,1-5

What it prints (run when this page was built)

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