本文へ移動

Karakuriからくり

8つの標準のパズルで遊び、探索や再現できる物理を使い、ポインターやキーボードで操作する盤を表示できます。

「からくり」は、仕組みや工夫した装置を表す言葉です。 名前について(英語)

目次

リファレンス

8つのパズルの規則

import { … } from "@johnmorrisdotca/karakuri";

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

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

エクスポート

名前種類概要
choiceStory名前空間
Controller型One level of one game, played.
GameInfo型What a game of the package is, for a chooser.
gridEscape名前空間
Info型What the player reads in the bar above the board.
KARAKURI_STRINGS定数Native player, keyboard, game and story words in English and Japanese.
KarakuriLanguage型The native English or Japanese puzzle-player language.
nutsAndBolts名前空間
pinRescue名前空間
Point型A place in a game's own world, in its own units (not pixels).
ropeCut名前空間
saveTheCharacter名前空間
say関数The words for key in lang, with each {name} filled from values; English when the language has none; the key itself when nobody has.
Say型A line of words to be said in the player's language: a key of KARAKURI_STRINGS and the values for its {name}s.
Status型How a level stands: still being played, won, or lost.
stretchGrabber名前空間
Theme型The colours and sizes a game draws with, read from the page's custom properties (--kk-*) so that it follows light, dark and the family's cloths.
tubeSort名前空間
VERSION定数The package's version, kept equal to package.json's by a test.
wordKey関数The key a game's words are kept under: its id with underscores for hyphens (game_tube_sort, rules_tube_sort).

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

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