Reference · Mazes, arrows and mixed boards
buildMazefunction
Make the maze a recipe names.
Import it
import { buildMaze } from "@johnmorrisdotca/meikyuu";
Definition
function buildMaze(recipe: MazeRecipe): Maze
Parameters
| Name | Type | Description |
|---|---|---|
recipe | MazeRecipe | The complete reproducible native recipe. |
Returns
Maze
Make the maze a recipe names.
Examples
import type { MazeRecipe } from "@johnmorrisdotca/meikyuu";
import { buildMaze } from "@johnmorrisdotca/meikyuu";
const recipe: MazeRecipe = {shape:"square",w:5,h:5,algorithm:"backtracker",mode:"to-goal",seed:42};
const maze = buildMaze(recipe);
const grid = maze.grid;
console.log(buildMaze(recipe).grid.cells);25What it prints (run when this page was built)