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

hexGridfunction

Columns by rows of hexagons, pointy side up, every odd row shifted half a cell right.

Import it

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

Definition

function hexGrid(w: number, h: number): Grid

Parameters

NameTypeDescription
wnumber

The native grid width in cells.

hnumber

The native grid height in cells.

Returns

Grid

Columns by rows of hexagons, pointy side up, every odd row shifted half a cell right.

Examples

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

console.log(hexGrid(5,5).cells);
25

What it prints (run when this page was built)

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