Reference · Cube engine and views
parseSolveMovefunction
One written step read for a cube of this size, or why it is not one.
Import it
import { parseSolveMove } from "@johnmorrisdotca/kyuubu";
Definition
function parseSolveMove(token: string, n: number): Omit<SolveMove, "at"> | "unknown" | "no-such-layer"
Parameters
| Name | Type | Description |
|---|---|---|
token | string | The notation token being read or described. |
n | number | The cube’s side length. |
Returns
"unknown" | "no-such-layer" | Omit<SolveMove, "at">
One written step read for a cube of this size, or why it is not one.
Examples
import { parseSolveMove } from "@johnmorrisdotca/kyuubu";
console.log(parseSolveMove("Rw", 3));{
text: 'Rw',
moves: [ { axis: 0, layer: 2, turns: 3 }, { axis: 0, layer: 1, turns: 3 } ],
counts: true
}What it prints (run when this page was built)