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

moveOnTablefunction

A tile on the table to another square: to an empty one it moves, onto a tile the two change places.

Import it

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

Definition

function moveOnTable(play: TilePlay, from: string, to: string): TilePlay

Parameters

NameTypeDescription
playTilePlay

The current immutable solo-game progress.

fromstring

The source square or seat index.

tostring

The destination square.

Returns

TilePlay

A tile on the table to another square: to an empty one it moves, onto a tile the two change places.

Examples

import { deal, moveOnTable, placeFromHand } from "@johnmorrisdotca/kumimoji";

const tiles = new Map([["0,0","c"],["0,1","a"],["0,2","t"]]);
const laid = placeFromHand(deal("catdog",3),0,"0,0");
console.log(moveOnTable(laid,"0,0","1,0").tiles);
Map(1) { '1,0' => 'c' }

What it prints (run when this page was built)

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