本文へ移動

Kazu数

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

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

目次

リファレンス

へやわけの規則

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

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

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

Heyawake has its own room model alongside Kazu's number puzzles.

エクスポート

名前種類概要
checkHeyawake関数Validate a Heyawake answer against the printed clues and complete native rules.
checkRoomSpans関数Add unshaded straight-line room-span violations to the supplied error set.
decodeHeyawake関数Read a native saved Heyawake game, or null for invalid board data or progress.
drawHeyawake関数Render the Heyawake board and supplied current state as native SVG text.
encodeHeyawake関数Encode the Heyawake board and current game as native resumable text.
generateHeyawake関数Generate a seeded Heyawake puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw.
HEYAWAKE_GENERATOR_MOST_CELLS定数The maximum number of cells accepted by the Heyawake generator.
HEYAWAKE_LEVELS定数The native Heyawake generation difficulty tiers.
HEYAWAKE_MOST_ATTEMPTS定数The native Heyawake generation-attempt limit.
HEYAWAKE_MOST_NODES定数The native Heyawake search-node budget.
HEYAWAKE_MOST_SIDE定数The maximum supported Heyawake board dimension.
HEYAWAKE_PLAY_STYLE定数Scoped native Heyawake board and player CSS.
HeyawakeAppearance型Language, material and marks for a native Heyawake board.
HeyawakeBoard型Heyawake dimensions and printed clues in their native row-major representation.
heyawakeCells関数Read room cells, or null for a room outside this board.
HeyawakeCheck型The Heyawake completion result and cells that violate its native rules.
HeyawakeDrawOptions型Current Heyawake marks or entries, selection, errors and native SVG appearance choices.
heyawakeFinished関数Whether this Heyawake game satisfies its complete native rules.
HeyawakeGame型The immutable Heyawake board, current entries or marks, undo history and assistance state.
HeyawakeLevel型A native difficulty tier for generated Heyawake puzzles.
HeyawakeMount型The mounted Heyawake game and progress, native controls and cleanup handle.
HeyawakeMountOptions型The initial Heyawake board, native progress, appearance and host event callbacks.
heyawakeNeighbours関数Read orthogonally adjacent Heyawake cells.
HeyawakePuzzle型A seeded Heyawake board with its verified solution and native difficulty tier.
HeyawakeRoom型A rectangular room and its optional required black-cell count.
HeyawakeSolve型A bounded Heyawake solve result: answer count, first solution, node work and whether the search completed.
heyawakeWords関数Read the native English or Japanese Heyawake labels.
hintHeyawake関数Find a native Heyawake hint, or null when no actionable hint is available.
isHeyawakeBoard関数Whether the value has valid native Heyawake dimensions, clues and data.
mountHeyawake関数Mount the native Heyawake player in a host element and return its cleanup and control handle.
newHeyawake関数Create the initial immutable Heyawake game from a valid board.
restartHeyawake関数Return the Heyawake game reset to its initial entries or marks.
roomForCell関数Read the containing room index for each Heyawake cell.
setHeyawakeCell関数Apply the requested native Heyawake entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
solveHeyawake関数Search for Heyawake answers up to the solution and node limits; completion distinguishes a proved result from exhausted work.
undoHeyawake関数Return the Heyawake game with its previous marks or entries restored, or unchanged when there is no undo history.

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

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