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

gridOffunction

A grid by name. w and h are columns and rows for squares, hexagons and triangles, and the size of the raster a shape is cut from for the rest (h is ignored there); for a circle w is the number of rings, and for a hexagon the radius, and for a pyramid the rows.

Import it

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

Definition

function gridOf(shape: MeikyuuShape, w: number, h?: number): Grid

Parameters

NameTypeDescription
shape"square" | "circle" | "hex" | "triangle" | "heart" | "leaf" | "star" | "ring" | "diamond" | "cross" | "moon" | "hexagon" | "pyramid"

The supported native flat-grid geometry or cut-out shape.

wnumber

The native grid width in cells.

h (optional)number

The native grid height in cells.

Returns

Grid

A grid by name. w and h are columns and rows for squares, hexagons and triangles, and the size of the raster a shape is cut from for the rest (h is ignored there); for a circle w is the number of rings, and for a hexagon the radius, and for a pyramid the rows.

Examples

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

console.log(gridOf("heart",9,9).cells);
52

What it prints (run when this page was built)

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