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 · Playable boards

puzzleOffunction

The puzzle a set of options names: a level of the package's lists, or a recipe given, or null.

Import it

import { puzzleOf } from "@johnmorrisdotca/meikyuu/play";

Definition

function puzzleOf(options: { kind?: MeikyuuKind; level?: number; recipe?: MeikyuuMountOptions["recipe"]; }): MeikyuuPuzzle | null

Parameters

NameTypeDescription
options{ kind?: MeikyuuKind; level?: number; recipe?: MeikyuuMountOptions["recipe"]; }

Native display/mount choices, or the point tuple specified by this signature.

Returns

MeikyuuPuzzle | null

The puzzle a set of options names: a level of the package's lists, or a recipe given, or null.

Examples

import type { MazeRecipe } from "@johnmorrisdotca/meikyuu";
import { puzzleOf } from "@johnmorrisdotca/meikyuu/play";

const recipe: MazeRecipe = {shape:"square",w:5,h:5,algorithm:"backtracker",mode:"to-goal",seed:42};
console.log(puzzleOf({kind:"maze",recipe})?.kind);
maze

What it prints (run when this page was built)

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