本文へ移動

Kyuubuキューブ

CSS 3Dのキューブをタッチ、キー、回転記号で回します。シードでスクランブルを再現し、名前付きの手順で解き方を追えます。

「キューブ」は、英語のcubeを表す日本語の表記です。 名前について(英語)

目次

リファレンス · キューブのエンジンと表示

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;
};

メンバー

名前型説明
sizenumber

The cube's side, 2 to 7.

scrambleCubeMove[]

The turns that scrambled a solved cube.

movesCubeMove[]

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

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kyuubu 1.14.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。