リファレンス
ループの規則
import { … } from "@johnmorrisdotca/kazu/loop";
最小化と gzip 圧縮をしたサイズは 11.2 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Loop uses a dedicated edge model and a single-loop constraint.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
checkLoop | 関数 | Checks all numbered cells, degree-two vertices, and one connected closed loop. |
decodeLoop | 関数 | Read a native saved Loop game, or null for invalid board data or progress. |
drawLoop | 関数 | Draws public clues and selected loop edges as an SVG board. |
edgeVertices | 関数 | Read the two vertex indices at the ends of a native Loop edge. |
encodeLoop | 関数 | Encode the Loop board and current game as native resumable text. |
generateLoop | 関数 | Makes a seeded puzzle and proves it has one answer. |
hintLoop | 関数 | Find a native Loop hint, or null when no actionable hint is available. |
isLoopBoard | 関数 | Whether the value has valid native Loop dimensions, clues and data. |
LOOP_LEVELS | 定数 | How hard a puzzle is made, by what a person must do to solve it; see rateLoop. |
LOOP_MOST_ATTEMPTS | 定数 | The native Loop generation-attempt limit. |
LOOP_MOST_NODES | 定数 | The native Loop search-node budget. |
LOOP_MOST_SIDE | 定数 | The maximum supported Loop board dimension. |
LOOP_SIZES | 定数 | The sides on offer for a square board; any side from 2 to LOOP_MOST_SIDE can be made. |
LoopBoard | 型 | Loop dimensions and printed clues in their native row-major representation. |
loopCellEdges | 関数 | Read the four edges around a cell, or null for a cell outside the board. |
LoopCheck | 型 | The Loop completion result and cells that violate its native rules. |
LoopDrawOptions | 型 | Current Loop marks or entries, selection, errors and native SVG appearance choices. |
loopEdgeCount | 関数 | An edge index is horizontal row-major first, then vertical row-major. |
loopFinished | 関数 | Whether this Loop game satisfies its complete native rules. |
LoopGame | 型 | The immutable Loop board, current entries or marks, undo history and assistance state. |
loopHorizontalCount | 関数 | Count horizontal edges in the Loop board’s native edge numbering. |
LoopLanguage | 型 | The native English or Japanese display language for Loop. |
LoopLevel | 型 | A native difficulty tier for generated Loop puzzles. |
LoopMaterial | 型 | A supported material of the native Loop board. |
LoopMount | 型 | The mounted Loop game and progress, native controls and cleanup handle. |
LoopMountOptions | 型 | The initial Loop board, native progress, appearance and host event callbacks. |
LoopProgress | 型 | The Loop constraint status of a partial board. |
LoopPuzzle | 型 | A seeded Loop board with its verified solution and native difficulty tier. |
LoopRating | 型 | How hard a board is, measured by solving it. |
LoopSolve | 型 | A bounded Loop solve result: answer count, first solution, node work and whether the search completed. |
loopVertexEdges | 関数 | Read edges meeting a native Loop vertex. |
mountLoop | 関数 | Mounts an accessible dot-and-edge loop player in the given host element. |
newLoop | 関数 | Create the initial immutable Loop game from a valid board. |
progressLoop | 関数 | Reports overfilled clues and branched vertices during play without requiring a finished loop. |
rateLoop | 関数 | Rates a board with one answer by solving it as a person would: with the rules, then by supposing one edge at a time. |
solveLoop | 関数 | Counts loop solutions with the pruning in loopLogic.ts under explicit work bounds. |
toggleLoop | 関数 | Apply the requested native Loop entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
undoLoop | 関数 | Return the Loop game with its previous marks or entries restored, or unchanged when there is no undo history. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。