Reference · Cube engine and views
undoAllfunction
A list of moves undone, last first.
Import it
import { undoAll } from "@johnmorrisdotca/kyuubu";
Definition
function undoAll(moves: readonly CubeMove[]): CubeMove[]
Parameters
| Name | Type | Description |
|---|---|---|
moves | readonly CubeMove[] | The turns, in their execution order. |
Returns
CubeMove[]
A list of moves undone, last first.
Examples
import { movesNotation, parseMoves, undoAll } from "@johnmorrisdotca/kyuubu";
const moves = parseMoves("R U2", 3)!;
console.log(movesNotation(undoAll(moves), 3));U2 R'What it prints (run when this page was built)