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 · Rules, tiles and records

handCanSpellfunction

Whether a hand can spell a word from the list: any word of two tiles or more, a wild counting as able to be anything.

Import it

import { handCanSpell } from "@johnmorrisdotca/kumimoji";

Definition

function handCanSpell(hand: readonly string[], words: TileWords): boolean

Parameters

NameTypeDescription
handreadonly string[]

The hand size or tile codes, as declared by the function signature.

wordsTileWords

The loaded native language word list and tile mappings.

Returns

boolean

Whether a hand can spell a word from the list: any word of two tiles or more, a wild counting as able to be anything.

Examples

import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";
import { handCanSpell } from "@johnmorrisdotca/kumimoji";

const words = await loadTileWordsFromModule("english");
console.log(handCanSpell(["c","a","t"],words));
true

What it prints (run when this page was built)

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