turnAllCuboidfunction
The state after every turn in order.
Import it
import { turnAllCuboid } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function turnAllCuboid(state: string, dims: CuboidDims, moves: readonly CuboidMove[]): string
Parameters
| Name | Type | Description |
|---|---|---|
state | string | The sticker-state string in the package’s face order. |
dims | CuboidDims | The cuboid’s x, y and z dimensions, in that order. |
moves | readonly CuboidMove[] | The turns, in their execution order. |
Returns
string
The state after every turn in order.
Examples
import { cuboidSolved, parseCuboidMove, solvedCuboid, turnAllCuboid, undoCuboidMove } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
const cmove = parseCuboidMove("R", dims)!;
console.log(cuboidSolved(turnAllCuboid(solvedCuboid(dims), dims, [cmove, undoCuboidMove(cmove)]), dims));trueWhat it prints (run when this page was built)