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

summarizefunction

A record's scramble and turns in notation, the cube before and after, whether it ended solved, and its count of moves.

Import it

import { summarize } from "@johnmorrisdotca/kyuubu";

Definition

function summarize(record: SolveRecord): SolveSummary

Parameters

NameTypeDescription
recordSolveRecord

The solve record to summarize or write.

Returns

SolveSummary

A record's scramble and turns in notation, the cube before and after, whether it ended solved, and its count of moves.

Examples

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

const moves = parseMoves("R U2", 3)!;
const record = { size: 3, scramble: parseMoves("R", 3)!, moves: parseMoves("R'", 3)!, ms: 1000, seed: "docs" };
console.log(summarize(record));
{
  size: 3,
  scramble: 'R',
  moves: "R'",
  start: 'UUFUUFUUFRRRRRRRRRFFDFFDFFDDDBDDBDDBLLLLLLLLLUBBUBBUBB',
  state: 'UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB',
  solved: true,
  count: 1
}

What it prints (run when this page was built)

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