Skip to the content

Karakuriからくり

Play eight native puzzles, run bounded searches, step deterministic physics and mount a canvas player controlled by pointer or keyboard.

Karakuri is the Japanese word からくり for a mechanism or ingenious device. About the name

Contents

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

NameTypeDescription
levelGridEscapeLevel

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);
9

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/karakuri 0.2.1.