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 · Original numbered levels

LegacyMazeLeveltype

WHERE THE 1.0.0 MAZE LEVELS WENT. The first release numbered 1,000 maze levels in one list; this release has 1,024 in four lists of 256 (MEIKYUU_MAZE_LEVELS), made from them: a level that was good enough stayed in the list, the ones that were too easy (99 small and 7 medium levels, and a few beside them whose effort the new mazes would have passed) have a new maze, and the 29 hardest large and 11 hardest huge levels are not in the list. Since 3.0.0 every list is in the order of its score, so where a maze stands in it (now, nowInSize) is not where it stood in the first release (place). A level somebody solved, or a link to one, still names a number or a recipe of the first release, and this module answers where that maze is now: the same maze at its place now (now), or no level at all, with the level of its size that scores nearest it to point at. A recipe never changes what it builds, so a solve kept by recipe is still a solve of that maze whatever it is called.

It is an entry of its own (@johnmorrisdotca/meikyuu/levels/legacy) because it carries the first release's thousand recipes, which only a site with players from before this release needs.

Import it

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

Definition

type LegacyMazeLevel = {
    readonly number: number;
    readonly code: string;
    readonly effort: number;
    readonly cells: number;
    readonly score: number;
    readonly size: MeikyuuSize;
    readonly place: number;
    readonly now: number | null;
    readonly nowInSize: number | null;
    readonly nearest: number;
};

Members

NameTypeDescription
numbernumber

Its number in the 1.0.0 list, from 1.

codestring
effortnumber
cellsnumber
scorenumber

The score difficultyOf gives it now (3.0.0 on: counting how much of the map its answer covers).

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

Its place among the levels of its size in 1.0.0, from 1: the number a site that listed the sizes met it at.

nownumber | null

Its number in MEIKYUU_MAZE_LEVELS now, from 1, when it is still a level; null when it is not.

nowInSizenumber | null

Its place among the levels of its size now (1 to 256), when it is still a level.

nearestnumber

The level to point at: this very maze where it is still a level (now), else the level of its size whose score is nearest its own (the first, on a tie), its number from 1 in MEIKYUU_MAZE_LEVELS.

Examples

import type { LegacyMazeLevel } from "@johnmorrisdotca/meikyuu/levels/legacy";
import { legacyLevelOf } from "@johnmorrisdotca/meikyuu/levels/legacy";

const value: LegacyMazeLevel = legacyLevelOf(1)!;
console.log(value);
{
  number: 1,
  code: 'square:3x3:prim:enter-leave:7920',
  effort: 9,
  cells: 9,
  score: 2,
  size: 'small',
  place: 1,
  now: null,
  nowInSize: null,
  nearest: 1
}

What it prints (run when this page was built)

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