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

zonesAcrossfunction

How many zones along each axis a map of cells is cut into: a flat map by 2, 3 or 4, a solid by 2 or 3.

Import it

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

Definition

function zonesAcross(cells: number, dimensions: number): number

Parameters

NameTypeDescription
cellsnumber

A cell-index path or total count specified by this signature.

dimensionsnumber

The number of coordinate dimensions.

Returns

number

How many zones along each axis a map of cells is cut into: a flat map by 2, 3 or 4, a solid by 2 or 3.

Examples

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

console.log(zonesAcross(25,2));
2

What it prints (run when this page was built)

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