readCuboidMovesfunction
A line of notation read for this cuboid, saying which piece is wrong and why where one is.
Import it
import { readCuboidMoves } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function readCuboidMoves(text: string, dims: CuboidDims): CuboidLineReading
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The text to parse or format. |
dims | CuboidDims | The cuboid’s x, y and z dimensions, in that order. |
Returns
CuboidLineReading
A line of notation read for this cuboid, saying which piece is wrong and why where one is.
Examples
import { readCuboidMoves } from "@johnmorrisdotca/kyuubu/cuboid";
const dims = [2, 3, 3] as const;
console.log(readCuboidMoves("R U2", dims));{
ok: true,
moves: [ { axis: 0, layer: 1, turns: 3 }, { axis: 1, layer: 2, turns: 2 } ]
}What it prints (run when this page was built)