SolveRecord型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One solve: the cube's size, the scramble that mixed it, and the turns made after.
インポート
import type { SolveRecord } from "@johnmorrisdotca/kyuubu";
定義
type SolveRecord = {
size: number;
scramble: CubeMove[];
moves: CubeMove[];
ms?: number;
at?: number;
seed?: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
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 (省略可) | number | undefined | How long the solve took, in milliseconds, where it was timed. |
at (省略可) | number | undefined | When it was done, in milliseconds since 1970, where that is known. |
seed (省略可) | string | undefined | The seed the scramble came from, where it came from one. |
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。