A from-scratch revamp of the original project featuring a real-time, rotatable 3D cube, live editing tools, scrambles, and a Kociemba-based solver queue. Everything now runs inside a single pygame window so you can inspect, edit, and solve without juggling dialogs.
- 3D viewer – drag to orbit the cube, with subtle shading to keep orientation obvious.
- Edit mode – pick any sticker, recolor it with the palette, or recreate a physical scramble by hand.
- Keyboard moves – press
R/L/U/D/F/B, hold Shift for inverses and Ctrl for double turns. - Scramble + reset – generate random scrambles or snap back to a solved cube instantly.
- Solution queue – call the Kociemba solver, preview every move, and step through them with a button or the
Nkey. - Clean control panel – concise sidebar with color swatches, essential buttons, and shortcut hints right beside the cube.
Install the dependencies with:
pip3 install pygame kociembaIf
kociembais missing the UI will still run, but the "Solve" button will report that the solver backend is unavailable.
python3 main.pyThe window opens with the cube in rotation mode. Drag with the left mouse button to orbit the view.
| Action | How |
|---|---|
| Toggle edit mode | E key or the panel button |
| Scramble cube | S key or the "Scramble" button |
| Reset cube | Backspace key or the "Reset" button |
| Solve cube | Space key or the "Solve" button |
| Apply next solution move | N key or the "Apply Next Move" button |
| Manual turns | R/L/U/D/F/B (hold Shift for X', Ctrl for X2) |
| Paint stickers | Enter edit mode, select a color swatch, then click stickers |
- The solution preview panel shows the queued moves in chunks of six; apply them one-by-one with
Nso you can follow along on a physical cube. - Hover a sticker while editing to see its face/row/column plus the current color.
- Holding the mouse while editing lets you "paint" multiple stickers quickly.
- Center stickers stay locked to keep the cube mechanically valid; if you need to restore them, use the Reset button.
This project is distributed for learning purposes; customize and extend it as you like!