Reference · Mazes, arrows and mixed boards
recipeCodefunction
A recipe as one short word, such as square:12x9:wilson:to-goal:48213 or heart:25:prim:keys-3:7, and the other way (parseRecipe).
Import it
import { recipeCode } from "@johnmorrisdotca/meikyuu";
Definition
function recipeCode(recipe: MazeRecipe): string
Parameters
| Name | Type | Description |
|---|---|---|
recipe | MazeRecipe | The complete reproducible native recipe. |
Returns
string
A recipe as one short word, such as square:12x9:wilson:to-goal:48213 or heart:25:prim:keys-3:7, and the other way (parseRecipe).
Examples
import type { MazeRecipe } from "@johnmorrisdotca/meikyuu";
import { recipeCode } from "@johnmorrisdotca/meikyuu";
const recipe: MazeRecipe = {shape:"square",w:5,h:5,algorithm:"backtracker",mode:"to-goal",seed:42};
console.log(recipeCode(recipe));square:5x5:backtracker:to-goal:42What it prints (run when this page was built)