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

ReduceOptionstype

Budgets and geometry choices for generating a puzzle by reducing clues.

Import it

import type { ReduceOptions } from "@johnmorrisdotca/tsunagi";

Definition

type ReduceOptions = {
    budget?: number;
    fewest?: number;
    most?: number;
    piece?: number;
    longest?: number;
    wrap?: boolean;
    portals?: number;
    waypoints?: number;
    blocked?: ReadonlySet<number>;
    blockedCount?: number;
    greed?: number;
    measure?: number;
};

Members

NameTypeDescription
budget (optional)number | undefined

Dead ends the solver may meet proving one join leaves the board with one answer. Default 20,000.

fewest (optional)number | undefined

Stop joining when this many lines are left. Default one: join while a proof is cheap enough.

most (optional)number | undefined

The most lines the board may end with, else none is made. Default MOST_PAIRS.

piece (optional)number | undefined

How long a piece of line the cutting starts from is, in cells. Default 4.

longest (optional)number | undefined

How far a line may grow before it is cut, in cells: the longest a line of the board can be. Default three times the side.

wrap (optional)boolean | undefined

A board whose edges join.

portals (optional)number | undefined

How many portals to put in.

waypoints (optional)number | undefined

How many waypoints to put in.

blocked (optional)ReadonlySet<number> | undefined

Cells no line enters.

blockedCount (optional)number | undefined

How many blocked cells to scatter, none beside another, when blocked is not given.

greed (optional)number | undefined

How eagerly the lines the board is cut from take their tightest way on (FillingStyle). Default 1.

measure (optional)number | undefined

Dead ends the measuring solve may meet before the board is dropped. Default 200,000.

Examples

import type { ReduceOptions } from "@johnmorrisdotca/tsunagi";

const value: ReduceOptions = {budget:20000,longest:8,most:8};
console.log(value);
{ budget: 20000, longest: 8, most: 8 }

What it prints (run when this page was built)

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