Skip to the content

Kumimoji組み文字

Build crosswords from seeded English or Japanese tile bags, alone or at a shared table.

Kumimoji means assembled characters in Japanese. About the name

Contents

Reference

Browser table

import { … } from "@johnmorrisdotca/kumimoji/ui";

674.9 kB minified and gzipped, with everything it imports (measured with esbuild)

Kumimoji played in the browser, in plain DOM: a whole game alone (mountKumimoji), and the window a board shows the grid through (boardModel). Its own entry, so the rules never carry a stylesheet.

Exports

NameKindWhat it is
BOARD_LEASTconstantThe fewest squares a side, so an empty or small table is still a table.
BOARD_MARGINconstantHow many empty squares are kept round the tiles on every side, so there is always room to build out.
boardModelfunctionTHE PART OF THE TABLE TO DRAW, for a grid and its verdict: the tiles and a margin round them, at least BOARD_LEAST a side, each square with its tile, what is printed on it, and how it stands.
BoardModeltypeThe part of the table to draw: how many rows and columns, and every square, row by row.
BoardSquaretypeOne square of the board drawn.
ClothtypeA cloth's name.
clothVarsfunctionA cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay.
isClothfunctionWhether a text names a cloth.
KUMIMOJI_CLOTHSconstantTHE CLOTHS A TABLE MAY BE LAID IN: the same five the whole family offers, and itsutsu.com's boards: green, blue, red, black and wood.
KUMIMOJI_STRINGSconstantThe table's words in each language it speaks: KUMIMOJI_STRINGS.en, KUMIMOJI_STRINGS.ja.
KUMIMOJI_STYLEconstantThe table's own styles, scoped to .km-root, every colour and size a CSS variable so a page can wear it in its own colours (set them on the element or any ancestor, or pass them as theme).
KumimojiLocaletypeThe languages the table speaks: English and Japanese.
kumimojiSayfunctionA line from a table of strings with its braces filled in: kumimojiSay(strings.left, { n: 12, time: "1:05" }).
kumimojiStringsfunctionThe table of strings for a locale with a page's own words laid over it.
KumimojiStringstypeEvery word the table shows, by name: one table of these for each language.
KumimojiTableHandletypeReadiness, structured play and presentation/game controls for a mounted table.
KumimojiTableOptionstypeOptional initial game, presentation, readiness and callback choices.
mountKumimojifunctionA GAME OF KUMIMOJI ALONE, IN PLAIN DOM: the bag dealt from a seed, your hand, and a table to build your crossword on, every run judged as you lay it.
TileMarktypeHow a tile on the table stands: part of a sound crossword, in a run that is not a word, or apart from the rest.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kumimoji 1.6.0.