Reference · Cube engine and views
ReplaySourcetype
What a replay is made from.
Import it
import type { ReplaySource } from "@johnmorrisdotca/kyuubu";
Definition
type ReplaySource = {
size?: number;
scramble: string;
solution: string;
timeMs?: number;
stepMs?: readonly number[];
};
Members
| Name | Type | Description |
|---|---|---|
size (optional) | number | undefined | The cube's side: 3 when left out. |
scramble | string | The scramble, as written. |
solution | string | The solve, as written; comments and brackets are skipped. |
timeMs (optional) | number | undefined | How long the solve took, in milliseconds, when that is known. |
stepMs (optional) | readonly number[] | undefined | How long each step of the solution took, in milliseconds, when that is known; one for every step. |
Examples
import type { ReplaySource } from "@johnmorrisdotca/kyuubu";
const value: ReplaySource = { size: 3, scramble: "R", solution: "R'", timeMs: 1000 };
console.log(value.timeMs);1000What it prints (run when this page was built)