joinTurns関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Turns of one layer in a row written as one, and any that come to nothing left out: "U' U2" is "U", "U' U" is nothing.
インポート
import { joinTurns } from "@johnmorrisdotca/kyuubu";
定義
function joinTurns(moves: readonly CubeMove[]): CubeMove[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
moves | readonly CubeMove[] | The turns, in their execution order. |
戻り値
CubeMove[]
Turns of one layer in a row written as one, and any that come to nothing left out: "U' U2" is "U", "U' U" is nothing.
例
import { joinTurns, movesNotation, parseMove, undoOf } from "@johnmorrisdotca/kyuubu";
const move = parseMove("R", 3)!;
console.log(movesNotation(joinTurns([move, undoOf(move)]), 3));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。