本文へ移動

Kyuubuキューブ

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

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

目次

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

toCSV関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

A list of solves as CSV, for a spreadsheet: a header, then a row a solve, with lines ended CRLF as RFC 4180 has them. The columns are time (when, ISO 8601), size, scramble, moves, count, solved, seconds and seed.

インポート

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

定義

function toCSV(records: readonly SolveRecord[]): string

引数

名前型説明
recordsreadonly SolveRecord[]

One or more solve records to export.

戻り値

string

A list of solves as CSV, for a spreadsheet: a header, then a row a solve, with lines ended CRLF as RFC 4180 has them. The columns are time (when, ISO 8601), size, scramble, moves, count, solved, seconds and seed.

例

import { parseMoves, toCSV } 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(toCSV([record]));
time,size,scramble,moves,count,solved,seconds,seed
,3,R,R',1,true,1.00,docs

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

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

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