undoCuboidMovesfunction
A list of moves undone, last first.
Import it
import { undoCuboidMoves } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function undoCuboidMoves(moves: readonly CuboidMove[]): CuboidMove[]
Parameters
| Name | Type | Description |
|---|---|---|
moves | readonly CuboidMove[] | The turns, in their execution order. |
Returns
CuboidMove[]
A list of moves undone, last first.
Examples
import { parseCuboidMove, undoCuboidMoves } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
const cmove = parseCuboidMove("R", dims)!;
console.log(undoCuboidMoves([cmove]));[ { axis: 0, layer: 1, turns: 1 } ]What it prints (run when this page was built)