Reference · Playable surface mazes
SolidEventDetailtype
What every event tells of the board.
Import it
import type { SolidEventDetail } from "@johnmorrisdotca/meikyuu/3d/play";
Definition
type SolidEventDetail = {
kind: "solid";
solid: SolidRecipe["kind"];
moves: number;
cells: number;
solved: boolean;
stones: number;
stonesLeft: number | null;
};
Members
| Name | Type | Description |
|---|---|---|
kind | "solid" | |
solid | SolidKind | |
moves | number | |
cells | number | |
solved | boolean | |
stones | number | |
stonesLeft | number | null |
Examples
import type { SolidRecipe } from "@johnmorrisdotca/meikyuu/3d";
import { buildSolidMaze } from "@johnmorrisdotca/meikyuu/3d";
import type { SolidEventDetail } from "@johnmorrisdotca/meikyuu/3d/play";
import { stonesLeft } from "@johnmorrisdotca/meikyuu";
const solidRecipe: SolidRecipe = {kind:"cube",n:2,algorithm:"backtracker",seed:42};
const solid = buildSolidMaze(solidRecipe);
const value: SolidEventDetail = {kind:"solid",solid:"cube",moves:0,cells:0,solved:false,stones:0,stonesLeft:null};
console.log(value);{
kind: 'solid',
solid: 'cube',
moves: 0,
cells: 0,
solved: false,
stones: 0,
stonesLeft: null
}What it prints (run when this page was built)