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

SolveSummarytype

What a record comes to, worked out from its turns.

Import it

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

Definition

type SolveSummary = {
    size: number;
    scramble: string;
    moves: string;
    start: string;
    state: string;
    solved: boolean;
    count: number;
};

Members

NameTypeDescription
sizenumber
scramblestring

The scramble in notation.

movesstring

The turns after it in notation.

startstring

The cube once scrambled.

statestring

The cube after every turn.

solvedboolean

Whether it ended solved.

countnumber

The moves that count: every turn but those of the whole cube.

Examples

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

const value: SolveSummary = summarize({ size: 3, scramble: parseMoves("R", 3)!, moves: parseMoves("R'", 3)! });
console.log(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.