本文へ移動

Kazu数

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

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

目次

リファレンス

美術館の規則

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

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

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

エクスポート

名前種類概要
AKARI_DENSER_ATTEMPTS定数The native Akari generation-attempt limit for each denser fallback.
AKARI_DENSER_CROWDS定数When a level finds no board in AKARI_MOST_ATTEMPTS plain attempts (a large board of an easy level, mostly: one attempt in a hundred succeeds on a 14×14), the generator tries again with more black squares, each of these multiples of the usual share in turn, AKARI_DENSER_ATTEMPTS attempts at each.
AKARI_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateAkari.
AKARI_MOST_ATTEMPTS定数The native Akari generation-attempt limit.
AKARI_MOST_NODES定数The native Akari search-node budget.
AKARI_MOST_SIDE定数The maximum supported Akari board dimension.
AKARI_PLAY_STYLE定数Scoped native Akari board and player CSS.
AKARI_SIZES定数The sides the demo and the site offer for a square board; any side from 2 to AKARI_MOST_SIDE can be made.
AKARI_STRINGS定数Native English and Japanese labels and announcements for Akari.
AkariBoard型A board is row-major.
AkariCheck型The Akari completion result and cells that violate its native rules.
AkariDrawOptions型Current Akari marks or entries, selection, errors and native SVG appearance choices.
akariFinished関数A game is finished only when its bulbs satisfy every rule and light every white square.
AkariGame型The immutable Akari board, current entries or marks, undo history and assistance state.
AkariLanguage型The native English or Japanese display language for Akari.
AkariLevel型A native difficulty tier for generated Akari puzzles.
AkariMaterial型A supported material of the native Akari board.
AkariMount型The mounted Akari game and progress, native controls and cleanup handle.
AkariMountOptions型The initial Akari board, native progress, appearance and host event callbacks.
akariNeighbours関数Returns the orthogonally adjacent cells to a board position.
AkariPieces型A supported native Akari mark or piece appearance.
AkariProgress型The Akari constraint status of a partial board.
AkariPuzzle型A seeded Akari board with its verified solution and native difficulty tier.
AkariRating型How hard a board is, measured by solving it.
AkariSolve型A bounded Akari solve result: answer count, first solution, node work and whether the search completed.
akariVisible関数White squares visible from a cell, including itself, stopping at black squares and edges.
checkAkari関数Checks a complete placement from the public rules, without consulting a stored answer.
decodeAkari関数Decodes a bounded save after validating the board and each placement.
drawAkari関数Draws the public clues and current bulbs as SVG.
encodeAkari関数Encodes only public clues and player placements.
generateAkari関数Makes a seeded board and proves it has one answer.
hintAkari関数Returns a missing bulb, or an extra bulb to remove, only after uniqueness is proved.
isAkariBoard関数Validates dimensions and the three public square kinds.
mountAkari関数Mounts the player in a host element; call destroy when the host is removed.
newAkari関数Starts a game with only its public board data.
progressAkari関数Reports immediate contradictions while allowing required clues to remain unsatisfied during play.
rateAkari関数Rates a board by solving it as a person would: with the rules alone (depth 0), then with one supposition at a time (depth 1), and anything beyond that is depth 2.
solveAkari関数Bounded constraint search over the rules in akariLogic.ts; a stopped proof is always marked incomplete.
toggleAkari関数Toggles a bulb on a white square and keeps one prior turn for undo.
undoAkari関数Restores the last bulb placement.

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

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