Reference
Eight puzzle-rule namespaces
import { … } from "@johnmorrisdotca/karakuri";
19.0 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
choiceStory | namespace | |
Controller | type | One level of one game, played. |
GameInfo | type | What a game of the package is, for a chooser. |
gridEscape | namespace | |
Info | type | What the player reads in the bar above the board. |
KARAKURI_STRINGS | constant | Native player, keyboard, game and story words in English and Japanese. |
KarakuriLanguage | type | The native English or Japanese puzzle-player language. |
nutsAndBolts | namespace | |
pinRescue | namespace | |
Point | type | A place in a game's own world, in its own units (not pixels). |
ropeCut | namespace | |
saveTheCharacter | namespace | |
say | function | 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 | type | 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 | type | How a level stands: still being played, won, or lost. |
stretchGrabber | namespace | |
Theme | type | 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 | namespace | |
VERSION | constant | The package's version, kept equal to package.json's by a test. |
wordKey | function | The key a game's words are kept under: its id with underscores for hyphens (game_tube_sort, rules_tube_sort). |