本文へ移動

Kazu数

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

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

目次

リファレンス

ヤジリンの規則

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

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

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

エクスポート

名前種類概要
checkYajilin関数Validate a Yajilin answer against the printed clues and complete native rules.
decodeYajilin関数Read a native saved Yajilin game, or null for invalid board data or progress.
encodeYajilin関数Encode the Yajilin board and current game as native resumable text.
generateYajilin関数Seeded original 5×5 families, accepted only after a completed uniqueness proof.
hintYajilin関数Find a native Yajilin hint, or null when no actionable hint is available.
isYajilinBoard関数Whether the value has valid native Yajilin dimensions, clues and data.
newYajilin関数Create the initial immutable Yajilin game from a valid board.
restartYajilin関数Return the Yajilin game reset to its initial entries or marks.
solveYajilin関数Counts public shade patterns whose remaining cells form the single required loop.
toggleYajilinEdge関数Apply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
toggleYajilinShade関数Apply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
undoYajilin関数Return the Yajilin game with its previous marks or entries restored, or unchanged when there is no undo history.
YAJILIN_NODE_BUDGET定数The native Yajilin search-node budget.
YAJILIN_SIZES定数The supported Yajilin board sizes.
YajilinBoard型Yajilin dimensions and printed clues in their native row-major representation.
YajilinCheck型The Yajilin completion result and cells that violate its native rules.
YajilinClue型An arrow direction and the required number of shaded cells in its ray.
YajilinDirection型The direction an arrow clue looks along a row or column.
YajilinDrawOptions型Current Yajilin marks or entries, selection, errors and native SVG appearance choices.
yajilinEdgeCount関数Count native Yajilin edges.
YajilinGame型The immutable Yajilin board, current entries or marks, undo history and assistance state.
YajilinMount型The mounted Yajilin game and progress, native controls and cleanup handle.
YajilinMountOptions型The initial Yajilin board, native progress, appearance and host event callbacks.
yajilinNeighbors関数Read adjacent Yajilin cells and the joining edge.
YajilinPuzzle型A seeded Yajilin board with its verified solution.
yajilinRay関数Read cells in the arrow’s indicated direction, excluding its own clue cell.
YajilinSolution型The solved Yajilin shading and loop edges.
YajilinSolve型A bounded Yajilin solve result: answer count, first solution, node work and whether the search completed.

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

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