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 · Numbered puzzle levels

MeikyuuMazeLeveltype

A numbered flat-maze recipe, difficulty measures, cell count and place within its size.

Import it

import type { MeikyuuMazeLevel } from "@johnmorrisdotca/meikyuu/levels";

Definition

type MeikyuuMazeLevel = Base & {
    readonly kind: "maze";
    readonly recipe: MazeRecipe;
    readonly cells: number;
    readonly score: number;
    readonly size: MeikyuuSize;
    readonly inSize: number;
};

Members

NameTypeDescription
numbernumber

Its place in its own list, from 1.

codestring

The recipe as one short word.

effortnumber

What it measures (see measureMaze, measureArrows, measureMixed).

ratingnumber

The effort as a rating from 1 to 100 on the scale of the maze list.

kind"maze"
recipeMazeRecipe
cellsnumber
scorenumber

How hard it is to play, from 0 to 100 (see difficultyOf): what each size's list is put in order by.

size"small" | "medium" | "large" | "huge"

The size it belongs to, as sizeOf words its cells.

inSizenumber

Its place among the levels of its size, from 1: the number a person playing that size meets it at.

Examples

import type { MeikyuuMazeLevel } from "@johnmorrisdotca/meikyuu/levels";
import { levelOf } from "@johnmorrisdotca/meikyuu/levels";

const value: MeikyuuMazeLevel = levelOf("maze",1)!;
console.log(value);
{
  kind: 'maze',
  number: 1,
  code: 'square:3x5:prim:to-goal:1538214105',
  effort: 22,
  rating: 15,
  score: 13,
  cells: 15,
  size: 'small',
  inSize: 1,
  recipe: {
    shape: 'square',
    w: 3,
    h: 5,
    algorithm: 'prim',
    mode: 'to-goal',
    seed: 1538214105
  }
}

What it prints (run when this page was built)

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