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

TUBE_SORT_LEVELSconstant

The levels, each with more colours and more tubes than the one before.

Import it

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

Definition

const TUBE_SORT_LEVELS: readonly TubePuzzle[] = [
    { tubes: [[2, 0, 2, 1], [2, 1, 0, 1], [1, 0, 0, 2], []] },
    { tubes: [[3, 0, 1, 2], [1, 2, 1, 3], [0, 0, 0, 3], [2, 1, 2, 3], []] },
    { tubes: [[1, 2, 2, 0], [1, 3, 1, 0], [1, 0, 2, 4], [0, 3, 4, 3], [4, 3, 2, 4], []] },
    { tubes: [[0, 2, 3, 2], [3, 4, 4, 0], [5, 0, 1, 1], [2, 3, 4, 1], [4, 1, 5, 3], [0, 5, 2, 5], []] },
    { tubes: [[5, 1, 5, 2], [0, 1, 6, 1], [4, 4, 2, 4], [6, 4, 2, 6], [2, 0, 3, 1], [0, 3, 6, 3], [3, 5, 0, 5], []] },
]

Examples

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

console.log(TUBE_SORT_LEVELS.length);
5

What it prints (run when this page was built)

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