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

Load level collections

import { … } from "@johnmorrisdotca/tsunagi/levels";

223.7 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
firstUnsolvedTsunagiLevelfunctionThe lowest level not yet solved, or null when every level of the size is.
isTsunagiLevelfunctionWhether a number is a level this size has.
levelCountOffunctionHow many levels a size has in a set; zero for a size the set has none at.
LevelRowtypeOne level: its layout and its one answer, each a code (code.ts).
levelSeedfunctionThe number a record keeps a level by: its own for the first set, TSUNAGI_PORTAL_SEED and its number for the portals.
loadEveryTsunagiLevelfunctionEvery size's levels of the first set, loaded.
loadTsunagiLevelsfunctionA size's levels in a set, loaded once and kept: the first set's by default, or the ones with portals.
nextTsunagiLevelfunctionThe level to open on: the first open one not yet solved, or the last open one when every open level is solved.
openTsunagiLevelsfunctionThe levels that are open, given the ones solved: the first block of sixteen always, and each block after it once every level of the block before is solved.
setOfSeedfunctionThe set and the number in it a record's number names.
TSUNAGI_LEVEL_COUNTSconstantHow many levels each size has, read without loading the size.
TSUNAGI_PORTAL_COUNTSconstantThe number of portal levels available at each supported size.
TSUNAGI_PORTAL_SEEDconstantA portal level's number in a record that keeps a level by one number: this and its number in its own set, past every level of the first.
TSUNAGI_PORTAL_SIZESconstantA second set of levels, boards with portals (code.ts): a line goes in at one ring and out of the other.
TSUNAGI_SIZESconstantTSUNAGI'S LEVELS, COUNTED: which sizes there are, how many levels each has, and which of them a player has opened.
tsunagiBandfunctionWhich third of a size a level sits in: its first third easy, its middle medium, its last hard.
TsunagiBandtypeThe third of a size a level sits in.
tsunagiLevelOffunctionThe level a layout is, at a loaded size and set, or null for a layout no level has.
tsunagiLevelsOffunctionA size already loaded in a set, or a refusal: nothing answers for a list it does not have.
TsunagiSettypeWhich set of levels: the ones from 4×4 up, or the ones with portals.

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