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
| Name | Type | Description |
|---|---|---|
play | TilePlay | The current immutable solo-game progress. |
verdict | GridVerdict | 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));falseWhat it prints (run when this page was built)