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

transformedfunction

A layout code turned or mirrored: turn quarter turns, then a mirror across the vertical when mirror. Its walls turn with it.

Import it

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

Definition

function transformed(code: string, size: number, turn: number, mirror: boolean): string

Parameters

NameTypeDescription
codestring

The native layout, answer or line-progress string.

sizenumber

The number of cells on each side of the board.

turnnumber

The number of quarter turns.

mirrorboolean

Whether to reflect the board.

Returns

string

A layout code turned or mirrored: turn quarter turns, then a mirror across the vertical when mirror. Its walls turn with it.

Examples

import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { transformed } from "@johnmorrisdotca/tsunagi";

const givens = TSUNAGI_4[0][0];
console.log(transformed(givens,4,1,true));
ABCD........ABCD

What it prints (run when this page was built)

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