undoCuboidMovefunction
The turn that takes one back.
Import it
import { undoCuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function undoCuboidMove(move: CuboidMove): CuboidMove
Parameters
| Name | Type | Description |
|---|---|---|
move | CuboidMove | The turn to apply, name or invert. |
Returns
CuboidMove
The turn that takes one back.
Examples
import { parseCuboidMove, undoCuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
const cmove = parseCuboidMove("R", dims)!;
console.log(undoCuboidMove(cmove));{ axis: 0, layer: 1, turns: 1 }What it prints (run when this page was built)