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

MEIKYUU_MODESconstant

A MAZE: a grid, the passages carved through it (always a spanning tree, so exactly one way between any two cells), and how it is played. The way to play is a declared field of the level, never inferred from the shape:

  • enter-leave: in at one door in the outer wall, out at another.
  • to-goal: from a cell inside to a dot hidden deep in the maze.
  • centre-out: from the middle of the shape to a door in the outer wall.
  • keys: from a cell inside, collecting every key, to a door in the outer wall. A key is picked up by passing over it, and stays picked up if the line is drawn back.

A maze is a recipe (MazeRecipe) and nothing else: the same recipe makes the same maze in every browser and every Node, because everything that decides it is integer arithmetic on a seeded stream.

Import it

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

Definition

const MEIKYUU_MODES: readonly ["enter-leave", "to-goal", "centre-out", "keys"] = ["enter-leave", "to-goal", "centre-out", "keys"] as const

Examples

import { MEIKYUU_MODES } from "@johnmorrisdotca/meikyuu";
console.log(MEIKYUU_MODES);
[ 'enter-leave', 'to-goal', 'centre-out', 'keys' ]

What it prints (run when this page was built)

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