stonesOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { stonesOf } from "@johnmorrisdotca/meikyuu/draw";
定義
function stonesOf(maze: Maze, stones: readonly number[]): string
引数
| 名前 | 型 | 説明 |
|---|---|---|
maze | Maze | The valid flat/surface maze or required maze-core fields. |
stones | readonly number[] | The currently placed passage-blocking stones. |
戻り値
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.
例
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,[]));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。