cuboidMoveNamefunction
What a move of a cuboid turns, in a few plain words, in English or Japanese:
R2 is "Right face, twice", 2U2 "Up layer 2, twice", M2 "Middle slice,
twice". It reads what cuboidMoveNotation writes (a face, a digit and a
face, M, E or S, then nothing, ' or 2); null for anything else, and for
the cube's wide turns and rotations, which a cuboid has none of.
Import it
import { cuboidMoveName } from "@johnmorrisdotca/kyuubu/cuboid";
Definition
function cuboidMoveName(code: string, language?: KyuubuLanguage): string | null
Parameters
| Name | Type | Description |
|---|---|---|
code | string | The encoded moves or standard notation to read. |
language (optional) | KyuubuLanguage | English or Japanese for the displayed words. |
Returns
string | null
What a move of a cuboid turns, in a few plain words, in English or Japanese: R2 is "Right face, twice", 2U2 "Up layer 2, twice", M2 "Middle slice, twice". It reads what cuboidMoveNotation writes (a face, a digit and a face, M, E or S, then nothing, ' or 2); null for anything else, and for the cube's wide turns and rotations, which a cuboid has none of.
Examples
import { cuboidMoveName } from "@johnmorrisdotca/kyuubu/cuboid";
console.log(cuboidMoveName("R2", "en"));Right face, twiceWhat it prints (run when this page was built)