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

StoneRulestype

STONES: a marble laid on a cell of the maze that the line may not enter. Where the maze is big, a player who has found that a passage leads nowhere wants to shut it, so that the line is not drawn down it again and the eye is not led down it either. A stone is a helper of the player's own and never part of the maze: it is not in the recipe, not in the answer and not in any check, and the maze is solved by exactly the line it was before.

It is not a pen. John, who asked for it: "I didn't want people to start painting the map and just placing anywhere... it has to be a carefully placed item that you must lay adjacent to your existing path." So a stone may be laid only

  • on a cell the line is not on, and that is not the start or the goal (so the way is never shut at either end),
  • on a cell that is joined by open passages to a cell of the line within reach steps (1 or 2: next to the line, or one cell beyond that), not counting a way through another stone, so a stone is laid at the root of a passage the line has just passed, never across a wall and never out in the middle of the maze,
  • while the game has stones left to lay (limit, or no limit at all), and not once the maze is solved.

A stone is taken up by asking for the cell again, which gives it back. Stones are part of the game's state: Undo puts back what a lay or a take changed, Restart takes them all up, and encodeRun and decodeRun keep a run with its stones as one short text.

These are pure functions like the rest of the game: each takes a game and returns a new one, or the same one when nothing changed.

Import it

import type { StoneRules } from "@johnmorrisdotca/meikyuu";

Definition

type StoneRules = {
    readonly limit: number | null;
    readonly reach: 1 | 2;
};

Members

NameTypeDescription
limitnumber | null

How many stones may be down at once, or null for as many as the player likes.

reach2 | 1

How far from the line a stone may be laid, in cells along the passages: 1 or 2.

Examples

import type { StoneRules } from "@johnmorrisdotca/meikyuu";

const value: StoneRules = {limit:5,reach:1};
console.log(value);
{ limit: 5, reach: 1 }

What it prints (run when this page was built)

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