本文へ移動

Kazu数

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

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

目次

リファレンス

領域の規則

import { … } from "@johnmorrisdotca/kazu/regions";

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

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

エクスポート

名前種類概要
checkRegions関数Checks region connectivity and area without consulting a generated answer.
decodeRegionsGame関数Read a native saved Regions game, or null for invalid board data or progress.
drawRegions関数Render the Regions board and supplied current state as native SVG text.
encodeRegionsGame関数Encode the Regions board and current game as native resumable text.
entryRegions関数Group connected cells carrying the same entry into candidate regions.
generateRegions関数Makes a seeded puzzle and proves its answer is the only one.
hintRegions関数Find a native Regions hint, or null when no actionable hint is available.
isRegionsBoard関数Whether the value has valid native Regions dimensions, clues and data.
newRegions関数Create the initial immutable Regions game from a valid board.
rateRegions関数Rates a board with one answer by solving it as a person would: with the rules, then by supposing one number at a time.
REGIONS_GENERATOR_MOST_CELLS定数The maximum number of cells accepted by the Regions generator.
REGIONS_LEAST_GENERATED_SIDE定数The minimum supported Regions board dimension for generation.
REGIONS_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateRegions.
REGIONS_MOST_ATTEMPTS定数The native Regions generation-attempt limit.
REGIONS_MOST_NODES定数The native Regions search-node budget.
REGIONS_MOST_SIDE定数The maximum supported Regions board dimension.
REGIONS_SIZES定数The sides on offer for a square board; any side from 4 to REGIONS_MOST_SIDE can be made.
RegionsBoard型Regions dimensions and printed clues in their native row-major representation.
RegionsCheck型The Regions completion result and cells that violate its native rules.
RegionsDrawOptions型Current Regions marks or entries, selection, errors and native SVG appearance choices.
regionsFinished関数Whether this Regions game satisfies its complete native rules.
RegionsGame型The immutable Regions board, current entries or marks, undo history and assistance state.
RegionsLevel型A native difficulty tier for generated Regions puzzles.
regionsNeighbours関数Read orthogonally adjacent Regions cells.
RegionsPuzzle型A seeded Regions board with its verified solution and native difficulty tier.
RegionsRating型How hard a board is, measured by solving it.
RegionsSolve型A bounded Regions solve result: answer count, first solution, node work and whether the search completed.
restartRegions関数Return the Regions game reset to its initial entries or marks.
setRegionsCell関数Apply the requested native Regions entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
solveRegions関数Counts completed partitions.
undoRegions関数Return the Regions game with its previous marks or entries restored, or unchanged when there is no undo history.

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

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