本文へ移動

Kazu数

検証済みの数独や論理パズルを作り、標準の規則とヒントを読み、盤を描いたり埋め込んだりできます。

「数」は数字を表す言葉です。 名前について(英語)

目次

リファレンス

ループの規則

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.

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

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