parseSolveMove関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One written step read for a cube of this size, or why it is not one.
インポート
import { parseSolveMove } from "@johnmorrisdotca/kyuubu";
定義
function parseSolveMove(token: string, n: number): Omit<SolveMove, "at"> | "unknown" | "no-such-layer"
引数
| 名前 | 型 | 説明 |
|---|---|---|
token | string | The notation token being read or described. |
n | number | The cube’s side length. |
戻り値
"unknown" | "no-such-layer" | Omit<SolveMove, "at">
One written step read for a cube of this size, or why it is not one.
例
import { parseSolveMove } from "@johnmorrisdotca/kyuubu";
console.log(parseSolveMove("Rw", 3));{
text: 'Rw',
moves: [ { axis: 0, layer: 2, turns: 3 }, { axis: 0, layer: 1, turns: 3 } ],
counts: true
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。