Skip to content

omar-elsherbiny/Rubiks-Cube

Repository files navigation

Rubiks-Cube

This is my first practical application of my matricies / linear algebra object i made a while ago

The game is made entirely in python and pygame with no external assets or images

There is a compiled exe in the repository but if you wish to run the python code make sure to install pygame beforehand using:

pip install pygame

Controls

  1. leftclick
    left click and drag to rotate a layer in the cube

    • red piece is the piece first selected
    • green piece is the piece you are hovering on
    • blue pieces are the selected layer to rotate based on the common operations between the red and green piece
  2. scrolldown
    scroll down to switch the mode to rotate any layer clockwise

  3. scrollup
    scroll up to switch the mode to rotate any layer anti-clockwise / counter-clockwise

  4. rightclick
    right click and drag to pan around the cube

    • the basis vectors at the bottom are the current orientation of the cube (white on top, green infront, and red on the side), though it changes if you make and operation on the middle layers of the cube
  5. scroll
    scroll button is just an extra feature to make a random operation on the cube

Scramble

The default values in the scramble.json is :

"set_scramble":false,
"scramble":""

If you wish to set a manual scramble, set it to true and the scramble you wish
example:

"set_scramble":true,
"scramble":"r` f b` u"

Setting it to true and "" will make the cube solved

About

Playable Rubik's cube in python and pygame

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages