Reference · Rules, tiles and records
kumimojiExportedfunction
A game as the JSON export's object.
Import it
import { kumimojiExported } from "@johnmorrisdotca/kumimoji";
Definition
function kumimojiExported(saved: KumimojiSaved): KumimojiExported
Parameters
| Name | Type | Description |
|---|---|---|
saved | KumimojiSaved | The original deal, current progress and elapsed time. |
Returns
KumimojiExported
A game as the JSON export's object.
Examples
import { deal, generateKumimoji, kumimojiExported } from "@johnmorrisdotca/kumimoji";
import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";
await loadTileWordsFromModule("english");
const play = deal("catdog",3);
const dealt = generateKumimoji(3,"hard",44);
const saved = {deal:dealt,play:deal(dealt.givens,dealt.size),elapsedMs:0};
console.log(kumimojiExported(saved).format);1What it prints (run when this page was built)