Reference
Load level collections
import { … } from "@johnmorrisdotca/tsunagi/levels";
223.7 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
firstUnsolvedTsunagiLevel | function | The lowest level not yet solved, or null when every level of the size is. |
isTsunagiLevel | function | Whether a number is a level this size has. |
levelCountOf | function | How many levels a size has in a set; zero for a size the set has none at. |
LevelRow | type | One level: its layout and its one answer, each a code (code.ts). |
levelSeed | function | The number a record keeps a level by: its own for the first set, TSUNAGI_PORTAL_SEED and its number for the portals. |
loadEveryTsunagiLevel | function | Every size's levels of the first set, loaded. |
loadTsunagiLevels | function | A size's levels in a set, loaded once and kept: the first set's by default, or the ones with portals. |
nextTsunagiLevel | function | The level to open on: the first open one not yet solved, or the last open one when every open level is solved. |
openTsunagiLevels | function | The 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. |
setOfSeed | function | The set and the number in it a record's number names. |
TSUNAGI_LEVEL_COUNTS | constant | How many levels each size has, read without loading the size. |
TSUNAGI_PORTAL_COUNTS | constant | The number of portal levels available at each supported size. |
TSUNAGI_PORTAL_SEED | constant | A 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_SIZES | constant | A second set of levels, boards with portals (code.ts): a line goes in at one ring and out of the other. |
TSUNAGI_SIZES | constant | TSUNAGI'S LEVELS, COUNTED: which sizes there are, how many levels each has, and which of them a player has opened. |
tsunagiBand | function | Which third of a size a level sits in: its first third easy, its middle medium, its last hard. |
TsunagiBand | type | The third of a size a level sits in. |
tsunagiLevelOf | function | The level a layout is, at a loaded size and set, or null for a layout no level has. |
tsunagiLevelsOf | function | A size already loaded in a set, or a refusal: nothing answers for a list it does not have. |
TsunagiSet | type | Which set of levels: the ones from 4×4 up, or the ones with portals. |