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

mayDrawfunction

Whether Draw may be pressed: the hand used, the grid sound, and a tile left to draw.

Import it

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

Definition

function mayDraw(play: TilePlay, verdict: GridVerdict): boolean

Parameters

NameTypeDescription
playTilePlay

The current immutable solo-game progress.

verdictGridVerdict

The native word and connectivity verdict for this grid.

Returns

boolean

Whether Draw may be pressed: the hand used, the grid sound, and a tile left to draw.

Examples

import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";
import { deal, judgeWithWords, mayDraw } from "@johnmorrisdotca/kumimoji";

const words = await loadTileWordsFromModule("english");
const play = deal("catdog",3);
const verdict = judgeWithWords(new Map([["0,0","c"],["0,1","a"],["0,2","t"]]),words);
console.log(mayDraw(play,verdict));
false

What it prints (run when this page was built)

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