Skip to main content

Rubik's Cube in Python

Project description

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)

>>> import pycuber as pc

>>> # Create a Cube object
>>> mycube = pc.Cube()

>>> # Do something at the cube.
>>> mycube("R U R' U'")

>>> print(mycube)
http://i.imgur.com/OI4kbn7.png

We also provided some useful tools to deal with Rubik’s Cube formulae.

>>> 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
>>> myalg.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycuber-0.2.2.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

pycuber-0.2.2-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file pycuber-0.2.2.tar.gz.

File metadata

  • Download URL: pycuber-0.2.2.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycuber-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ca7721a559fb1dc77c2a63b82cec39aef158c2f1a3ff7c6ede713e2de522a444
MD5 ddc197b6cc6b1e4debc398f8b044a967
BLAKE2b-256 a5659be8116ab862d03ef4f079c71198b24471c06c974983d3352421e50ff5b5

See more details on using hashes here.

File details

Details for the file pycuber-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pycuber-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 081ad3e965667a101e7057d77904cb22d8f6ec1f50c19cf05fe7e66354049a73
MD5 8afec703105a27147d4eac7ba5ab97d5
BLAKE2b-256 ab32fe85b9038355d0d7920fb7e88b3e1756fbea9949f6e0bdc9401fdb2a92d6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page