本文へ移動

Kazu数

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

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

目次

リファレンス

カックロの規則

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.

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

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