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 · Playable board

TsunagiMountOptionstype

The puzzle, native display choices, controls and event callbacks for mounting a board.

Import it

import type { TsunagiMountOptions } from "@johnmorrisdotca/tsunagi/play";

Definition

type TsunagiMountOptions = TsunagiLook & {
    size: number;
    givens: string;
    answer?: string;
    level?: number;
    set?: TsunagiSet;
    lines?: Lines;
    explosions?: TsunagiExplosionChoice;
    cheats?: boolean;
    controls?: boolean;
    chips?: boolean;
    zoom?: "auto" | "on" | "off";
    language?: TsunagiLanguage;
    onChange?: (detail: TsunagiEventDetail) => void;
    onStroke?: (detail: TsunagiEventDetail) => void;
    onExplosion?: (detail: TsunagiEventDetail) => void;
    onSolve?: (detail: TsunagiEventDetail) => void;
};

Members

NameTypeDescription
marks (optional)TsunagiMarks | undefined
fill (optional)TsunagiFill | undefined
colours (optional)"marble" | "bright" | "colour-blind" | "soft" | readonly TsunagiColour[] | undefined
board (optional)"paper" | "wood" | "green" | "blue" | "red" | "black" | TsunagiBoardLook | undefined
coordinates (optional)boolean | undefined
sizenumber

The board's size: how many cells across.

givensstring

The level's layout code.

answer (optional)string | undefined

The level's one answer, as a code. With it a solve must be that answer, and Cheat can be offered.

level (optional)number | undefined

Which level of its size this is, to show its difficulty and its place in its block.

set (optional)TsunagiSet | undefined

Which set of levels level is in: classic (the default) or portals.

lines (optional)Lines | undefined

Lines to start from, to carry on a game kept half played.

explosions (optional)TsunagiExplosionChoice | undefined

Explosions as made (the default), softened or off.

cheats (optional)boolean | undefined

Offer Cheat, which draws one unfinished line. Needs answer. Default false.

controls (optional)boolean | undefined

The buttons and the lines of words under the board. Default true.

chips (optional)boolean | undefined

A row of chips under the board: the level's difficulty and each challenge on it, each with the line that explains it when pressed. Default false.

zoom (optional)"on" | "off" | "auto" | undefined

auto (the default): the zoom and move pad from 10×10 up. off: never. on: always.

language (optional)TsunagiLanguage | undefined

The language the words are in. Left out, the host's own lang, or the page's, and it follows the page's.

onChange (optional)((detail: TsunagiEventDetail) => void) | undefined
onStroke (optional)((detail: TsunagiEventDetail) => void) | undefined
onExplosion (optional)((detail: TsunagiEventDetail) => void) | undefined
onSolve (optional)((detail: TsunagiEventDetail) => void) | undefined

Examples

import { TSUNAGI_4 } from "@johnmorrisdotca/tsunagi/levels-4";
import type { TsunagiMountOptions } from "@johnmorrisdotca/tsunagi/play";

const givens = TSUNAGI_4[0][0];
const answer = TSUNAGI_4[0][1];
const value: TsunagiMountOptions = {size:4,givens,answer,controls:true};
console.log(value);
{
  size: 4,
  givens: 'A..AB..BC..CD..D',
  answer: 'AAAABBBBCCCCDDDD',
  controls: true
}

What it prints (run when this page was built)

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