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

kumimojiToJSONfunction

A game as JSON, two spaces deep, with the format's number first. kumimojiFromJSON reads it back.

Import it

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

Definition

function kumimojiToJSON(saved: KumimojiSaved): string

Parameters

NameTypeDescription
savedKumimojiSaved

The original deal, current progress and elapsed time.

Returns

string

A game as JSON, two spaces deep, with the format's number first. kumimojiFromJSON reads it back.

Examples

import { deal, generateKumimoji, kumimojiToJSON } 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(kumimojiToJSON(saved));
{
  "format": 1,
  "game": "kumimoji",
  "generator": "kumimoji 1.6.0",
  "size": 3,
  "level": "hard",
  "seed": 44,
  "language": "english",
  "gameLength": "short",
  "doubleSet": false,
  "diagonals": false,
  "progress": "3::nwo:",
  "elapsedMs": 0
}

What it prints (run when this page was built)

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