リファレンス
カックロの規則
import { … } from "@johnmorrisdotca/kazu/cross-sums";
最小化と gzip 圧縮をしたサイズは 10.4 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
canReach | 関数 | Whether the remaining distinct digits can reach the target sum in the given slots. |
checkCrossSums | 関数 | Checks exact run sums and distinct digits independently of a stored answer. |
CROSS_SUMS_GENERATION_ATTEMPTS | 定数 | The native CrossSums generation-attempt limit. |
CROSS_SUMS_GENERATION_NODES | 定数 | The native CrossSums search-node budget. |
CROSS_SUMS_LEAST_GENERATED_SIDE | 定数 | The minimum supported CrossSums board dimension for generation. |
CROSS_SUMS_LEVELS | 定数 | How hard a puzzle is made, by what a person must do to solve it; see rateCrossSums. |
CROSS_SUMS_MAX_ATTEMPTS | 定数 | The native CrossSums generation-attempt limit. |
CROSS_SUMS_MAX_NODES | 定数 | The native CrossSums search-node budget. |
CROSS_SUMS_MAX_SIDE | 定数 | The maximum supported CrossSums board dimension. |
CROSS_SUMS_MIN_SIDE | 定数 | The minimum supported CrossSums board dimension. |
CROSS_SUMS_PLAY_STYLE | 定数 | Scoped native CrossSums board and player CSS. |
CROSS_SUMS_SIZES | 定数 | The sides on offer, counting the row and column of totals; any side from 5 to CROSS_SUMS_MAX_SIDE can be made. |
CROSS_SUMS_STRINGS | 定数 | Native English and Japanese labels and announcements for CrossSums. |
CrossSumsBoard | 型 | CrossSums dimensions and printed clues in their native row-major representation. |
CrossSumsCell | 型 | A white digit cell or a black clue cell with optional across/down totals. |
CrossSumsCheck | 型 | The CrossSums completion result and cells that violate its native rules. |
CrossSumsDrawOptions | 型 | Current CrossSums marks or entries, selection, errors and native SVG appearance choices. |
CrossSumsGame | 型 | The immutable CrossSums board, current entries or marks, undo history and assistance state. |
CrossSumsLanguage | 型 | The native English or Japanese display language for CrossSums. |
CrossSumsLevel | 型 | A native difficulty tier for generated CrossSums puzzles. |
CrossSumsMaterial | 型 | A supported material of the native CrossSums board. |
CrossSumsMount | 型 | The mounted CrossSums game and progress, native controls and cleanup handle. |
CrossSumsMountOptions | 型 | The initial CrossSums board, native progress, appearance and host event callbacks. |
CrossSumsPieces | 型 | A supported native CrossSums mark or piece appearance. |
CrossSumsPuzzle | 型 | A seeded CrossSums board with its verified solution and native difficulty tier. |
CrossSumsRating | 型 | How hard a board is, measured by solving it. |
CrossSumsRun | 型 | One across or down digit run, its clue cell, constituent cells and target sum. |
crossSumsRuns | 関数 | Read across and down digit runs with their clue cells and totals. |
CrossSumsSolve | 型 | A bounded CrossSums solve result: answer count, first solution, node work and whether the search completed. |
decodeCrossSums | 関数 | Read a native saved CrossSums game, or null for invalid board data or progress. |
drawCrossSums | 関数 | Render the CrossSums board and supplied current state as native SVG text. |
encodeCrossSums | 関数 | Encode the CrossSums board and current game as native resumable text. |
enterCrossSums | 関数 | Apply the requested native CrossSums entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
finishedCrossSums | 関数 | Whether this CrossSums game satisfies its complete native rules. |
generateCrossSums | 関数 | Makes a seeded board of size squares a side (counting the row and column of totals) and proves it has one answer. |
hintCrossSums | 関数 | Find a native CrossSums hint, or null when no actionable hint is available. |
isCrossSumsBoard | 関数 | Whether the value has valid native CrossSums dimensions, clues and data. |
mountCrossSums | 関数 | Mount the native CrossSums player in a host element and return its cleanup and control handle. |
newCrossSums | 関数 | Create the initial immutable CrossSums game from a valid board. |
progressCrossSums | 関数 | Allows unfinished runs while flagging duplicate digits and impossible remaining totals. |
rateCrossSums | 関数 | Rates a board with one answer by solving it: with the single-run rules, with the digit-that-must-appear rule, then by supposing. |
restartCrossSums | 関数 | Return the CrossSums game reset to its initial entries or marks. |
solveCrossSums | 関数 | Bounded exact counter over across and down runs; an interrupted search never proves uniqueness. |
undoCrossSums | 関数 | Return the CrossSums game with its previous marks or entries restored, or unchanged when there is no undo history. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。