Skip to the content

Meikyuu迷宮

Generate seeded mazes and arrow puzzles, follow numbered levels, and play on flat grids or three-dimensional surfaces.

Meikyuu is the Japanese word 迷宮 for labyrinth. About the name

Contents

Reference · Mazes, arrows and mixed boards

pickfunction

One of the items, chosen from the stream.

Import it

import { pick } from "@johnmorrisdotca/meikyuu";

Definition

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

Parameters

NameTypeDescription
itemsreadonly T[]

Items to pick from or copy/shuffle.

randomRandom

A random source returning values in [0,1).

Returns

T

One of the items, chosen from the stream.

Examples

import { pick, seededRandom } from "@johnmorrisdotca/meikyuu";

console.log(pick(["A","B","C"],seededRandom(42)));
B

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/meikyuu 3.2.0.