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

triangleGridfunction

Rows of triangles, each pointing up or down in turn, w to a row; a cell is up when its column and row make an even number.

Import it

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

Definition

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

Parameters

NameTypeDescription
wnumber

The native grid width in cells.

hnumber

The native grid height in cells.

Returns

Grid

Rows of triangles, each pointing up or down in turn, w to a row; a cell is up when its column and row make an even number.

Examples

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

console.log(triangleGrid(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.