rubik's cube notation code example
Example 1: checkerboard rubik's cube pattern
Algorithm: U2 D2 R2 L2 F2 B2
Example 2: rubik's cube algorithm in javascript
// Create a new solved cube instance
const cube = new Cube();
// Apply an algorithm or randomize the cube state
cube.move("U F R2 B' D2 L'");
cube.randomize();
// Create a new random cube
const randomCube = Cube.random();