本文へ移動

Kazu数

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

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

目次

リファレンス

遊べる数字の盤

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

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

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

Kazu, played in a page: mountKazu draws a puzzle into any element and plays it by touch, mouse and keyboard, with a number pad, pencil marks, Undo, Hint, Check and a clock, and the words in English and Japanese. A separate entry (@johnmorrisdotca/kazu/play), so a server never loads any of it.

エクスポート

名前種類概要
ensureKazuPlayStyle関数Put the style in the page once: in the document's head, or in the shadow root the host is in.
KAZU_PLAY_STYLE定数THE STYLE a playable Kazu board wears (mountKazu, <kazu-board>): the drawing's own (KAZU_STYLE) and the board's box, its number pad, its buttons and its lines of words.
kazuClockText関数A time taken, as a clock shows it: m:ss, and h:mm:ss past an hour.
KazuEventDetail型What every event tells of the board.
KazuMount型The native mounted number grid, its current game/detail, controls and cleanup methods.
KazuMountOptions型The puzzle, optional solution/progress, assistance, controls and event callbacks for mounting a number grid.
KazuMountSettings型Everything about how a mounted board plays that can change while it is on the page.
mountKazu関数Draw a puzzle into host and play it.
mountShikaku関数A rectangle player in any element; mount once, update appearance with set, destroy on unmount.
SHIKAKU_PLAY_STYLE定数Scoped native Shikaku board and player CSS.
SHIKAKU_STRINGS定数Native English and Japanese labels and announcements for Shikaku.
ShikakuDrawOptions型Current Shikaku marks or entries, selection, errors and native SVG appearance choices.
ShikakuLanguage型The native English or Japanese display language for Shikaku.
ShikakuMaterial型A supported material of the native Shikaku board.
ShikakuMount型The mounted Shikaku game and progress, native controls and cleanup handle.
ShikakuMountOptions型The initial Shikaku board, native progress, appearance and host event callbacks.
ShikakuPieces型A supported native Shikaku mark or piece appearance.

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

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