Reference · Cube engine and views
movementTextfunction
A movement in notation: one layer as moveNotation writes it; several
layers from a face inwards, about one axis and as far, as a wide turn
(Rw, 3Rw'); anything else as its moves one after another.
Import it
import { movementText } from "@johnmorrisdotca/kyuubu";
Definition
function movementText(moves: readonly CubeMove[], n: number): string
Parameters
| Name | Type | Description |
|---|---|---|
moves | readonly CubeMove[] | The turns, in their execution order. |
n | number | The cube’s side length. |
Returns
string
A movement in notation: one layer as moveNotation writes it; several layers from a face inwards, about one axis and as far, as a wide turn (Rw, 3Rw'); anything else as its moves one after another.
Examples
import { movementText, parseMoves } from "@johnmorrisdotca/kyuubu";
const moves = parseMoves("R U2", 3)!;
console.log(movementText(moves, 3));R U2What it prints (run when this page was built)