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

recipeCodefunction

A recipe as one short word, such as square:12x9:wilson:to-goal:48213 or heart:25:prim:keys-3:7, and the other way (parseRecipe).

Import it

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

Definition

function recipeCode(recipe: MazeRecipe): string

Parameters

NameTypeDescription
recipeMazeRecipe

The complete reproducible native recipe.

Returns

string

A recipe as one short word, such as square:12x9:wilson:to-goal:48213 or heart:25:prim:keys-3:7, and the other way (parseRecipe).

Examples

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

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

What it prints (run when this page was built)

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