Reference · Numbered puzzle levels
levelOffunction
Level number n (from 1) of a kind, or null when there is none.
Import it
import { levelOf } from "@johnmorrisdotca/meikyuu/levels";
Definition
function levelOf(kind: "maze", n: number): MeikyuuMazeLevel | null
function levelOf(kind: "arrows", n: number): MeikyuuArrowLevel | null
function levelOf(kind: "mixed", n: number): MeikyuuMixedLevel | null
function levelOf(kind: MeikyuuKind, n: number): MeikyuuLevel | null
Parameters
| Name | Type | Description |
|---|---|---|
kind | "maze" | "arrows" | "mixed" | The native puzzle family or surface shape specified by this signature. |
n | number | The level number, random bound or surface subdivision specified by the signature. |
Returns
MeikyuuLevel | null
Level number n (from 1) of a kind, or null when there is none.
Examples
import { levelOf } from "@johnmorrisdotca/meikyuu/levels";
console.log(levelOf("maze",1)?.code);square:3x5:prim:to-goal:1538214105What it prints (run when this page was built)