Skip to the content

Kyuubuキューブ

Turn CSS 3D cubes by touch, keys or notation, reproduce a scramble from a seed, and follow a solve one named step at a time.

Kyuubu (キューブ) is the Japanese spelling of cube. About the name

Contents

Reference · Cuboid engine

CuboidLineReadingtype

What reading a line gives: its moves, or the first piece that is not one, where it began (counted in characters from 0) and why.

Import it

import type { CuboidLineReading } from "@johnmorrisdotca/kyuubu/cuboid";

Definition

type CuboidLineReading = {
    ok: true;
    moves: CuboidMove[];
} | {
    ok: false;
    token: string;
    at: number;
    fault: CuboidFault;
};

Examples

import type { CuboidLineReading } from "@johnmorrisdotca/kyuubu/cuboid";
import { readCuboidMoves } from "@johnmorrisdotca/kyuubu/cuboid";

const value: CuboidLineReading = readCuboidMoves("R U2", [2, 3, 3]);
console.log(value.ok);
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kyuubu 1.14.1.