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 · Playable boards

MeikyuuEventDetailtype

What every event tells of the board.

Import it

import type { MeikyuuEventDetail } from "@johnmorrisdotca/meikyuu/play";

Definition

type MeikyuuEventDetail = {
    kind: MeikyuuKind;
    level: number | null;
    moves: number;
    cells: number;
    keys: number;
    keysOf: number;
    hearts: number | null;
    arrowsLeft: number | null;
    solved: boolean;
    orientation: "portrait" | "landscape" | null;
    turned: boolean;
    stones: number;
    stonesLeft: number | null;
};

Members

NameTypeDescription
kind"maze" | "arrows" | "mixed"
levelnumber | null

The level's number in its list, when it is one of the package's.

movesnumber

Strokes drawn (mazes) or arrows tapped (arrow puzzles).

cellsnumber

Cells in the line now.

keysnumber
keysOfnumber
heartsnumber | null

Hearts left, for arrow puzzles.

arrowsLeftnumber | null
solvedboolean
orientation"portrait" | "landscape" | null

How a maze is shown now (portrait when it is taller than wide as shown), or null for arrows.

turnedboolean

Whether the maze is shown turned from how it was made.

stonesnumber

Stones laid now (0 for a board with none).

stonesLeftnumber | null

Stones that can still be laid: null for no limit, 0 for a board with no stones.

Examples

import type { MeikyuuEventDetail } from "@johnmorrisdotca/meikyuu/play";
import { arrowsLeft, stonesLeft } from "@johnmorrisdotca/meikyuu";

const value: MeikyuuEventDetail = {kind:"maze",level:null,moves:0,cells:0,keys:0,keysOf:0,hearts:null,arrowsLeft:null,solved:false,orientation:"landscape",turned:false,stones:0,stonesLeft:null};
console.log(value);
{
  kind: 'maze',
  level: null,
  moves: 0,
  cells: 0,
  keys: 0,
  keysOf: 0,
  hearts: null,
  arrowsLeft: null,
  solved: false,
  orientation: 'landscape',
  turned: false,
  stones: 0,
  stonesLeft: null
}

What it prints (run when this page was built)

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