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 · Load level collections

tsunagiLevelOffunction

The level a layout is, at a loaded size and set, or null for a layout no level has.

Import it

import { tsunagiLevelOf } from "@johnmorrisdotca/tsunagi/levels";

Definition

function tsunagiLevelOf(size: number, givens: string, set?: TsunagiSet): number | null

Parameters

NameTypeDescription
sizenumber

The number of cells on each side of the board.

givensstring

The original native layout code.

set (optional)TsunagiSet

The native level set or palette specified by the signature.

Returns

number | null

The level a layout is, at a loaded size and set, or null for a layout no level has.

Examples

import { loadTsunagiLevels, tsunagiLevelOf } from "@johnmorrisdotca/tsunagi/levels";
import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";

await loadTsunagiLevels(4);
const givens = TSUNAGI_4[0][0];
console.log(tsunagiLevelOf(4,givens));
1

What it prints (run when this page was built)

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