Reference · Native level collections
gridPuzzleOffunction
The board of a level, read.
Import it
import { gridPuzzleOf } from "@johnmorrisdotca/karakuri/levels";
Definition
function gridPuzzleOf(level: GridEscapeLevel): GridPuzzle
Parameters
| Name | Type | Description |
|---|---|---|
level | GridEscapeLevel | The native one-based player level number, or typed level record required by the signature. |
Returns
GridPuzzle
The board of a level, read.
Examples
import { GRID_ESCAPE_LEVELS, gridPuzzleOf } from "@johnmorrisdotca/karakuri/levels";
import { length } from "@johnmorrisdotca/karakuri/physics";
console.log(gridPuzzleOf(GRID_ESCAPE_LEVELS[0]).blocks.length);9What it prints (run when this page was built)