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
| Name | Type | Description |
|---|---|---|
size | number | The cube's side, 2 to 7. |
scramble | CubeMove[] | The turns that scrambled a solved cube. |
moves | CubeMove[] | 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);trueWhat it prints (run when this page was built)