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

twistRolefunction

A level's part in its block's lesson, or null for a level that has none (1 to 14, or a 15th or 16th left plain because somebody had played it). newOnes are the challenges no earlier level of the size has: what a 15th introduces.

Import it

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

Definition

function twistRole(layouts: readonly string[], level: number): TwistRole | null

Parameters

NameTypeDescription
layoutsreadonly string[]

The layout codes in one level collection.

levelnumber

The one-based level number.

Returns

TwistRole | null

A level's part in its block's lesson, or null for a level that has none (1 to 14, or a 15th or 16th left plain because somebody had played it). newOnes are the challenges no earlier level of the size has: what a 15th introduces.

Examples

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

console.log(twistRole(TSUNAGI_4.map(([code])=>code),15));
null

What it prints (run when this page was built)

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