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

wordsInHandfunction

The words the hand's own tiles spell, longest first and then in the list's order; wilds are not used.

Import it

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

Definition

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

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

string[]

The words the hand's own tiles spell, longest first and then in the list's order; wilds are not used.

Examples

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

const words = await loadTileWordsFromModule("english");
console.log(wordsInHand(["c","a","t"],words));
[ 'act', 'cat', 'at', 'ta' ]

What it prints (run when this page was built)

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