本文へ移動

Tsunagi繋ぎ

同じ印の2つを別々の線で結び、盤を埋めます。収録された問題やシード付きの問題で遊べます。

「つなぎ」は、物をつなぐことを表す言葉です。 名前について(英語)

目次

リファレンス

問題集の読み込み

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

最小化と gzip 圧縮をしたサイズは 223.7 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
firstUnsolvedTsunagiLevel関数The lowest level not yet solved, or null when every level of the size is.
isTsunagiLevel関数Whether a number is a level this size has.
levelCountOf関数How many levels a size has in a set; zero for a size the set has none at.
LevelRow型One level: its layout and its one answer, each a code (code.ts).
levelSeed関数The number a record keeps a level by: its own for the first set, TSUNAGI_PORTAL_SEED and its number for the portals.
loadEveryTsunagiLevel関数Every size's levels of the first set, loaded.
loadTsunagiLevels関数A size's levels in a set, loaded once and kept: the first set's by default, or the ones with portals.
nextTsunagiLevel関数The level to open on: the first open one not yet solved, or the last open one when every open level is solved.
openTsunagiLevels関数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関数The set and the number in it a record's number names.
TSUNAGI_LEVEL_COUNTS定数How many levels each size has, read without loading the size.
TSUNAGI_PORTAL_COUNTS定数The number of portal levels available at each supported size.
TSUNAGI_PORTAL_SEED定数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定数A second set of levels, boards with portals (code.ts): a line goes in at one ring and out of the other.
TSUNAGI_SIZES定数TSUNAGI'S LEVELS, COUNTED: which sizes there are, how many levels each has, and which of them a player has opened.
tsunagiBand関数Which third of a size a level sits in: its first third easy, its middle medium, its last hard.
TsunagiBand型The third of a size a level sits in.
tsunagiLevelOf関数The level a layout is, at a loaded size and set, or null for a layout no level has.
tsunagiLevelsOf関数A size already loaded in a set, or a refusal: nothing answers for a list it does not have.
TsunagiSet型Which set of levels: the ones from 4×4 up, or the ones with portals.

ソースを見るGitHub で編集@johnmorrisdotca/tsunagi 1.7.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。