リファレンス
ましゅの規則
import { … } from "@johnmorrisdotca/kazu/masyu";
最小化と gzip 圧縮をしたサイズは 2.6 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
checkMasyu | 関数 | Validate a Masyu answer against the printed clues and complete native rules. |
decodeMasyu | 関数 | Read a native saved Masyu game, or null for invalid board data or progress. |
encodeMasyu | 関数 | Encode the Masyu board and current game as native resumable text. |
generateMasyu | 関数 | Seeded original loop layouts; every output is accepted only after a completed uniqueness proof. |
hintMasyu | 関数 | Find a native Masyu hint, or null when no actionable hint is available. |
isMasyuBoard | 関数 | Whether the value has valid native Masyu dimensions, clues and data. |
MASYU_NODE_BUDGET | 定数 | The native Masyu search-node budget. |
MASYU_SIZES | 定数 | The supported Masyu board sizes. |
MasyuBoard | 型 | Masyu dimensions and printed clues in their native row-major representation. |
masyuCellCount | 関数 | Count cells in a Masyu board. |
MasyuCheck | 型 | The Masyu completion result and cells that violate its native rules. |
MasyuDrawOptions | 型 | Current Masyu marks or entries, selection, errors and native SVG appearance choices. |
masyuEdgeCount | 関数 | Count native Masyu edges. |
masyuFinished | 関数 | Whether this Masyu game satisfies its complete native rules. |
MasyuGame | 型 | The immutable Masyu board, current entries or marks, undo history and assistance state. |
MasyuMount | 型 | The mounted Masyu game and progress, native controls and cleanup handle. |
MasyuMountOptions | 型 | The initial Masyu board, native progress, appearance and host event callbacks. |
masyuNeighbors | 関数 | Read adjacent Masyu cells with the joining edge and direction. |
MasyuPuzzle | 型 | A seeded Masyu board with its verified solution. |
MasyuSolve | 型 | A bounded Masyu solve result: answer count, first solution, node work and whether the search completed. |
newMasyu | 関数 | Create the initial immutable Masyu game from a valid board. |
restartMasyu | 関数 | Return the Masyu game reset to its initial entries or marks. |
solveMasyu | 関数 | Counts distinct single loops with local pearl rules; budget stops never claim a proof. |
toggleMasyuEdge | 関数 | Apply the requested native Masyu entry or mark to a new immutable game; invalid or fixed targets stay unchanged. |
undoMasyu | 関数 | Return the Masyu game with its previous marks or entries restored, or unchanged when there is no undo history. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。