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

STORIESconstant

The stories, one to a level.

Import it

import { STORIES } from "@johnmorrisdotca/karakuri/levels";

Definition

const STORIES: readonly Story[] = [
    {
        stages: [
            { problem: "rain", tools: ["umbrella", "sunglasses"], right: 0 },
            { problem: "puddle", tools: ["sandals", "boots"], right: 1 },
            { problem: "door", tools: ["key", "balloon"], right: 0 },
        ],
    },
    {
        stages: [
            { problem: "dark", tools: ["spoon", "flashlight"], right: 1 },
            { problem: "gap", tools: ["plank", "pillow"], right: 0 },
            { problem: "bear", tools: ["ball", "honey"], right: 1 },
        ],
    },
    {
        stages: [
            { problem: "snow", tools: ["shovel", "kite"], right: 0 },
            { problem: "wind", tools: ["sunhat", "scarf"], right: 1 },
            { problem: "hill", tools: ["sandals", "sled"], right: 1 },
        ],
    },
    {
        stages: [
            { problem: "sea", tools: ["raft", "ball"], right: 0 },
            { problem: "treasure", tools: ["sandwich", "map"], right: 1 },
            { problem: "chest", tools: ["spoon", "key"], right: 1 },
        ],
    },
]

Examples

import { STORIES } from "@johnmorrisdotca/karakuri/levels";
import { length } from "@johnmorrisdotca/karakuri/physics";

console.log(STORIES.length);
4

What it prints (run when this page was built)

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