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

shuffledfunction

A copy of the list in a random order (Fisher–Yates).

Import it

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

Definition

function shuffled<T>(items: readonly T[], random: Random): T[]

Parameters

NameTypeDescription
itemsreadonly T[]

The items to copy and shuffle.

randomRandom

A reproducible random function returning values in [0,1).

Returns

T[]

A copy of the list in a random order (Fisher–Yates).

Examples

import { seededRandom, shuffled } from "@johnmorrisdotca/kumimoji";

console.log(shuffled(["c","a","t"],seededRandom(42)));
[ 't', 'c', 'a' ]

What it prints (run when this page was built)

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