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

newTsunagiGamefunction

A game on a layout code, or null for a code that is no layout at that size.

Import it

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

Definition

function newTsunagiGame(givens: string, size: number, options?: TsunagiGameOptions): TsunagiGame | null

Parameters

NameTypeDescription
givensstring

The original native layout code.

sizenumber

The number of cells on each side of the board.

options (optional)TsunagiGameOptions

Native drawing, geometry, game or mount settings.

Returns

TsunagiGame | null

A game on a layout code, or null for a code that is no layout at that size.

Examples

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

const givens = TSUNAGI_4[0][0];
const answer = TSUNAGI_4[0][1];
console.log(newTsunagiGame(givens,4,{answer})?.solved);
false

What it prints (run when this page was built)

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