mountKumimojifunction
A 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. Tap a tile in your hand and then a square to lay it; tap a tile on the table and then a square to move it, or tap it again to take it back. When the hand is empty and every run is a word, Draw brings the next tile; a tile you cannot use can be traded for three. Use every tile in the bag to finish. Under the buttons, the game saves as JSON or as text, and a saved game loads back.
The word list is fetched the first time a game in its language is dealt.
Import it
import { mountKumimoji } from "@johnmorrisdotca/kumimoji/ui";
Definition
function mountKumimoji(target: HTMLElement, options?: KumimojiTableOptions): KumimojiTableHandle
Parameters
| Name | Type | Description |
|---|---|---|
target | HTMLElement | The host element for this table. |
options (optional) | KumimojiTableOptions | Initial deal or saved state, presentation and callbacks. |
Returns
KumimojiTableHandle
The native handle, including ready and presentation updates without redealing.
Examples
import { mountKumimoji } from "@johnmorrisdotca/kumimoji/ui";
if (typeof document !== "undefined") {
const table = mountKumimoji(document.createElement("div"), { keep: false });
void table.ready.then(() => table.destroy());
}
console.log(typeof mountKumimoji);functionWhat it prints (run when this page was built)