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

dealfunction

The opening hand: the first handSize tiles of the bag, and an empty table.

Import it

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

Definition

function deal(bag: string, handSize: number): TilePlay

Parameters

NameTypeDescription
bagstring

The original bag in draw order.

handSizenumber

The initial number of tiles to draw.

Returns

TilePlay

The opening hand: the first handSize tiles of the bag, and an empty table.

Examples

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

console.log(deal("catdog",3));
{
  bag: 'catdog',
  returned: '',
  taken: 3,
  tiles: Map(0) {},
  hand: [ 'c', 'a', 't' ]
}

What it prints (run when this page was built)

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