Reference · Rules, tiles and records
KumimojiChecktype
The answer to "does this grid finish the game?": yes, or no and why, in English (reason) and as a stable code with values a site can say in its own language (KUMIMOJI_CHECK_REASONS).
Import it
import type { KumimojiCheck } from "@johnmorrisdotca/kumimoji";
Definition
type KumimojiCheck = {
ok: true;
} | {
ok: false;
reason: string;
code: KumimojiCheckCode;
values?: KumimojiCheckValues;
};
Examples
import type { KumimojiCheck } from "@johnmorrisdotca/kumimoji";
const value: KumimojiCheck = {ok:false,reason:"the grid is not finished",code:"grid-not-finished"};
console.log(value);{
ok: false,
reason: 'the grid is not finished',
code: 'grid-not-finished'
}What it prints (run when this page was built)