Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianliaw/PyCuber
Rubik's Cube solver in Python
https://github.com/adrianliaw/PyCuber
cube rubik-cube
Last synced: about 1 month ago
JSON representation
Rubik's Cube solver in Python
- Host: GitHub
- URL: https://github.com/adrianliaw/PyCuber
- Owner: adrianliaw
- License: mit
- Created: 2013-12-14T04:56:27.000Z (about 11 years ago)
- Default Branch: version2
- Last Pushed: 2019-01-28T10:20:53.000Z (almost 6 years ago)
- Last Synced: 2024-11-25T15:55:22.678Z (about 1 month ago)
- Topics: cube, rubik-cube
- Language: Python
- Homepage:
- Size: 1.2 MB
- Stars: 199
- Watchers: 17
- Forks: 47
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
PyCuber
====================### `pip install pycuber`
PyCuber is a Rubik's Cube package in Python 2/3
--------------------The cube can be revealed as expanded view in the terminal,
so it's easy to visualise the cube, just inside the terminal.
(Not tested on Windows)``` python
import pycuber as pc
# Create a Cube object
mycube = pc.Cube()# Do something at the cube.
mycube("R U R' U'")print(mycube)
```
![alt tag](http://i.imgur.com/OI4kbn7.png)We also provided some useful tools to deal with Rubik's Cube formulae.
``` python
import pycuber as pc
# Create a Formula object
my_formula = pc.Formula("R U R' U' R' F R2 U' R' U' R U R' F'")# Reversing a Formula
my_formula.reverse()
print(my_formula)# Mirroring a Formula object
my_formula.mirror("LR")
print(my_formula)```
```
F R U' R' U R U R2 F' R U R U' R'
F' L' U L U' L' U' L2 F L' U' L' U L
```I'll add some documentations later.