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

encodePortalsfunction

The portals as a layout writes them, after wrap: each pair as its smaller cell and its larger, the pairs in order; nothing where there are none.

Import it

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

Definition

function encodePortals(pairs: Iterable<readonly [number, number]>): string

Parameters

NameTypeDescription
pairsIterable<readonly [number, number]>

The portal-cell pairs.

Returns

string

The portals as a layout writes them, after wrap: each pair as its smaller cell and its larger, the pairs in order; nothing where there are none.

Examples

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

console.log(encodePortals([[3,40]]));
portals3-40

What it prints (run when this page was built)

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