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 · Table element

KumimojiElementOptionstype

Full native host options, including saved state, private words and callbacks.

Import it

import type { KumimojiElementOptions } from "@johnmorrisdotca/kumimoji/element";

Also exported from: @johnmorrisdotca/kumimoji/element/define

Definition

type KumimojiElementOptions = KumimojiTableOptions;

Members

NameTypeDescription
language (optional)KumimojiLanguage | undefined

The language of the tiles: "english" or "japanese" kana. English by default.

hand (optional)number | undefined

The opening hand: 3, 7 or 11 tiles.

level (optional)KumimojiLevel | undefined

How many of the tiles are wild: "easy" the most, "medium" some, "hard" none.

gameLength (optional)KumimojiLength | undefined

How much of the set the bag holds: "short", "medium", or "full", all 144 tiles.

diagonals (optional)boolean | undefined

Every diagonal run of three or more must be a word too.

seed (optional)number | undefined

The seed the bag is dealt from; a new one each game when absent.

onFinish (optional)((result: { deal: KumimojiDeal; play: TilePlay; elapsedMs: number; }) => void) | undefined

Told when the last tile is laid and every run is a word, with the time it took.

onChange (optional)((saved: KumimojiSaved) => void) | undefined

Told after every change to the game, with the game as it would be saved.

locale (optional)KumimojiLocale | undefined

The language of the table's words, which is not the language of the tiles: "en" or "ja". By default the page's own (<html lang>), and English for any other.

strings (optional)Partial<KumimojiStrings> | undefined

Words of your own, laid over the locale's: any of KumimojiStrings.

theme (optional)Readonly<Record<string, string>> | undefined

CSS variables set on the table itself, which win in light and dark alike: { "--km-felt": "#23405a" }.

cloth (optional)"green" | "blue" | "red" | "black" | "wood" | undefined

The cloth the table is laid in: "green", "blue", "red", "black" or "wood", the family's five. theme is laid over it.

keep (optional)boolean | undefined

Whether the table offers saving and loading. True by default.

controls (optional)boolean | undefined

Show native play-action buttons; a host hiding them supplies its own actions.

saved (optional)KumimojiSaved | undefined

A validated saved game to restore initially instead of dealing a new one.

onError (optional)((error: Error) => void) | undefined

Called after a word-list load or initial restoration fails.

Examples

import type { KumimojiElementOptions } from "@johnmorrisdotca/kumimoji/element";
const options: KumimojiElementOptions = { keep: false, locale: "ja" };
console.log(options.locale);
ja

What it prints (run when this page was built)

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