リファレンス
縦横の規則
import { … } from "@johnmorrisdotca/kazu/juosan";
最小化と gzip 圧縮をしたサイズは 6.1 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
checkJuosan | 関数 | Checks public rules directly, independently of the solver and stored answer. |
decodeJuosan | 関数 | Reads a bounded public save; malformed or incompatible data returns null. |
drawJuosan | 関数 | Draws a public Juosan board as an SVG string. |
encodeJuosan | 関数 | Serializes public clues, placements, and assisted status. |
generateJuosan | 関数 | Makes an original small training puzzle and returns it only after uniqueness is proved. |
hintJuosan | 関数 | Returns one next mark only when the public clues prove a unique answer. |
isJuosanBoard | 関数 | Whether territories partition a bounded board and each territory is connected. |
JUOSAN_LEVELS | 定数 | The native Juosan generation difficulty tiers. |
JUOSAN_MOST_ATTEMPTS | 定数 | The native Juosan generation-attempt limit. |
JUOSAN_MOST_NODES | 定数 | The native Juosan search-node budget. |
JUOSAN_MOST_SIDE | 定数 | The maximum supported Juosan board dimension. |
JUOSAN_PLAY_STYLE | 定数 | Scoped native Juosan board and player CSS. |
JUOSAN_STRINGS | 定数 | Native English and Japanese labels and announcements for Juosan. |
JuosanBoard | 型 | Juosan dimensions and printed clues in their native row-major representation. |
JuosanCheck | 型 | The Juosan completion result and cells that violate its native rules. |
JuosanDrawOptions | 型 | Current Juosan marks or entries, selection, errors and native SVG appearance choices. |
juosanFinished | 関数 | Whether every cell is filled and the independent checker accepts the board. |
JuosanGame | 型 | The immutable Juosan board, current entries or marks, undo history and assistance state. |
JuosanLanguage | 型 | The native English or Japanese display language for Juosan. |
JuosanLevel | 型 | A native difficulty tier for generated Juosan puzzles. |
JuosanMark | 型 | A blank, horizontal or vertical mark in a Juosan cell. |
JuosanMaterial | 型 | A supported material of the native Juosan board. |
JuosanMount | 型 | The mounted Juosan game and progress, native controls and cleanup handle. |
JuosanMountOptions | 型 | The initial Juosan board, native progress, appearance and host event callbacks. |
JuosanPieces | 型 | A supported native Juosan mark or piece appearance. |
JuosanPuzzle | 型 | A seeded Juosan board with its verified solution and native difficulty tier. |
JuosanSolve | 型 | A bounded Juosan solve result: answer count, first solution, node work and whether the search completed. |
JuosanTerritory | 型 | A territory is a list of zero-based cell indexes and an absolute orientation difference. |
juosanTerritoryAt | 関数 | Returns the index of the territory containing a cell, or -1 when absent. |
mountJuosan | 関数 | Mounts a touch, mouse, and keyboard player into an existing page element. |
newJuosan | 関数 | Starts a game with a copy of its public board and no generated answer. |
restartJuosan | 関数 | Clears the board while retaining whether the player used a hint. |
setJuosanMark | 関数 | Writes a mark and records the previous state; invalid or unchanged moves are ignored. |
solveJuosan | 関数 | Counts labeled solutions up to a limit; complete distinguishes exhaustion from cutoff. |
undoJuosan | 関数 | Restores the preceding mark state, if one exists. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。