リファレンス
領域の規則
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. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。