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