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 · Cube engine and views

SolveRecordtype

One solve: the cube's size, the scramble that mixed it, and the turns made after.

Import it

import type { SolveRecord } from "@johnmorrisdotca/kyuubu";

Definition

type SolveRecord = {
    size: number;
    scramble: CubeMove[];
    moves: CubeMove[];
    ms?: number;
    at?: number;
    seed?: string;
};

Members

NameTypeDescription
sizenumber

The cube's side, 2 to 7.

scrambleCubeMove[]

The turns that scrambled a solved cube.

movesCubeMove[]

The turns made after the scramble, in order, whole-cube turns among them.

ms (optional)number | undefined

How long the solve took, in milliseconds, where it was timed.

at (optional)number | undefined

When it was done, in milliseconds since 1970, where that is known.

seed (optional)string | undefined

The seed the scramble came from, where it came from one.

Examples

import type { SolveRecord } from "@johnmorrisdotca/kyuubu";
import { parseMoves, summarize } from "@johnmorrisdotca/kyuubu";

const value: SolveRecord = { size: 3, scramble: parseMoves("R", 3)!, moves: parseMoves("R'", 3)!, ms: 1000 };
console.log(summarize(value).solved);
true

What it prints (run when this page was built)

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