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

keptViewfunction

A view kept inside the board: never a gap between the board's edge and the box's. box is the box's width in pixels.

Import it

import { keptView } from "@johnmorrisdotca/tsunagi/play";

Definition

function keptView(view: TsunagiView, box: number): TsunagiView

Parameters

NameTypeDescription
viewTsunagiView

The current zoom and pixel translation.

boxnumber

The available square view size or edge bounds.

Returns

TsunagiView

A view kept inside the board: never a gap between the board's edge and the box's. box is the box's width in pixels.

Examples

import { keptView } from "@johnmorrisdotca/tsunagi/play";

console.log(keptView({zoom:1,x:0,y:0},640));
{ zoom: 1, x: 0, y: 0 }

What it prints (run when this page was built)

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