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

generateKumimojifunction

MAKING A KUMIMOJI, in the browser, from a seed: the bag the game is played from, in the order its tiles come out.

A bag drawn blind from the mix can be one nobody can finish — two Q's and no U, and every tile must be laid before the game ends. So the bag is made the other way round: a crossword is laid first, word by word, from letters drawn from the mix (TILE_MIX), and the bag is that crossword's tiles, shuffled. Every bag has at least one finished grid, which is the puzzle's solution — kept only to prove that, never shown — and a player may build any other.

The crossword grows from a word across the middle: each next word crosses a tile already down, its new tiles touching nothing at their sides, so every run on it is a word by construction. Words are chosen to use the letters drawn from the mix, and never a letter more times than the whole set holds, so the bag reads like a handful from the full set.

With Diagonals, the crossword must read as a word along its diagonals too: a new tile that would make a diagonal run of three or more is laid only where that run is a word (fit), so the proof holds under the rule the game is played by. Without, nothing about the laying changes, and a seed deals the bag it always dealt.

Deterministic in the seed, like every generator here: two browsers in a race, or one tomorrow, deal the same bag in the same order.

Import it

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

Definition

function generateKumimoji(size: number, level: KumimojiLevel, seed: number, options?: KumimojiOptions): KumimojiDeal

Parameters

NameTypeDescription
sizenumber

The supported initial hand size.

levelKumimojiLevel

The difficulty that determines the wildcard allowance.

seednumber

The numeric seed for deterministic deals or random draws.

options (optional)KumimojiOptions

Native game, component or presentation options.

Returns

KumimojiDeal

MAKING A KUMIMOJI, in the browser, from a seed: the bag the game is played from, in the order its tiles come out.

Examples

import { generateKumimoji } from "@johnmorrisdotca/kumimoji";
import { loadTileWordsFromModule } from "@johnmorrisdotca/kumimoji/words";

await loadTileWordsFromModule("english");
console.log(generateKumimoji(3,"hard",44).givens);
nwosy

What it prints (run when this page was built)

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