本文へ移動

Kumimoji組み文字

シードから配った英字やかなのタイルで、ひとりでも複数人の卓でも、単語を組み合わせて遊べます。

「組み文字」は文字を組み合わせることを表す言葉です。 名前について(英語)

目次

リファレンス · 卓の要素

KumimojiElementOptions型

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

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

インポート

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

ほかのエクスポート元: @johnmorrisdotca/kumimoji/element/define

定義

type KumimojiElementOptions = KumimojiTableOptions;

メンバー

名前型説明
language (省略可)KumimojiLanguage | undefined

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

hand (省略可)number | undefined

The opening hand: 3, 7 or 11 tiles.

level (省略可)KumimojiLevel | undefined

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

gameLength (省略可)KumimojiLength | undefined

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

diagonals (省略可)boolean | undefined

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

seed (省略可)number | undefined

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

onFinish (省略可)((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 (省略可)((saved: KumimojiSaved) => void) | undefined

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

locale (省略可)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 (省略可)Partial<KumimojiStrings> | undefined

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

theme (省略可)Readonly<Record<string, string>> | undefined

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

cloth (省略可)"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 (省略可)boolean | undefined

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

controls (省略可)boolean | undefined

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

saved (省略可)KumimojiSaved | undefined

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

onError (省略可)((error: Error) => void) | undefined

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

例

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

出力(このページを作ったときに実行した結果)

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

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