puzzleOffunction
The puzzle a set of options names: a level of the package's lists, or a recipe given, or null.
Import it
import { puzzleOf } from "@johnmorrisdotca/meikyuu/play";
Definition
function puzzleOf(options: { kind?: MeikyuuKind; level?: number; recipe?: MeikyuuMountOptions["recipe"]; }): MeikyuuPuzzle | null
Parameters
| Name | Type | Description |
|---|---|---|
options | { kind?: MeikyuuKind; level?: number; recipe?: MeikyuuMountOptions["recipe"]; } | Native display/mount choices, or the point tuple specified by this signature. |
Returns
MeikyuuPuzzle | null
The puzzle a set of options names: a level of the package's lists, or a recipe given, or null.
Examples
import type { MazeRecipe } from "@johnmorrisdotca/meikyuu";
import { puzzleOf } from "@johnmorrisdotca/meikyuu/play";
const recipe: MazeRecipe = {shape:"square",w:5,h:5,algorithm:"backtracker",mode:"to-goal",seed:42};
console.log(puzzleOf({kind:"maze",recipe})?.kind);mazeWhat it prints (run when this page was built)