stonesOffunction
The stones laid on a maze, as SVG: each a marble (mk-stone) with a small gleam (mk-gleam) on the cell, one unit across being a cell.
Import it
import { stonesOf } from "@johnmorrisdotca/meikyuu/draw";
Definition
function stonesOf(maze: Maze, stones: readonly number[]): string
Parameters
| Name | Type | Description |
|---|---|---|
maze | Maze | The valid flat/surface maze or required maze-core fields. |
stones | readonly number[] | The currently placed passage-blocking stones. |
Returns
string
The stones laid on a maze, as SVG: each a marble (mk-stone) with a small gleam (mk-gleam) on the cell, one unit across being a cell.
Examples
import type { MazeRecipe } from "@johnmorrisdotca/meikyuu";
import { buildMaze } from "@johnmorrisdotca/meikyuu";
import { stonesOf } from "@johnmorrisdotca/meikyuu/draw";
const recipe: MazeRecipe = {shape:"square",w:5,h:5,algorithm:"backtracker",mode:"to-goal",seed:42};
const maze = buildMaze(recipe);
console.log(stonesOf(maze,[]));