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

Explosiontype

EXPLOSIONS: every so many strokes, a drawn line is broken. John's row: "a drawn line broken or removed every so many moves", with a warning beat before it and "which line is deterministic from the level seed and the moves made", so two players making the same strokes on the same level meet the same explosions, and nothing is left to a coin in the browser.

A stroke is a line let go having changed the board (TsunagiSolve's lift). After the every-th stroke, and every every after it, one line with something drawn is chosen by a hash of the board and the stroke's number:

  • boom<N>: that line is cut back to half its length.
  • blast<N>: that line is wiped, and one line touching it is cut back to half as well.

A stroke that solves the level sets nothing off: the level is done first. Pure, like the rest of the drawing rules: new lines, the old ones untouched.

Import it

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

Definition

type Explosion = {
    lines: Lines;
    hit: number[];
    cells: number[];
};

Members

NameTypeDescription
linesLines
hitnumber[]
cellsnumber[]

Examples

import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import { decodeLayout, noLines } from "@johnmorrisdotca/tsunagi";
import type { Explosion } from "@johnmorrisdotca/tsunagi";

const givens = TSUNAGI_4[0][0];
const layout = decodeLayout(givens,4)!;
const lines = noLines(layout);
const value: Explosion = {lines,hit:[0],cells:[0]};
console.log(value);
{ lines: [ [], [], [], [] ], hit: [ 0 ], cells: [ 0 ] }

What it prints (run when this page was built)

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