Final Project- CSE 167 - Student: Nima Nekoui

Comments

This is your standard rubiks cube. Solve away!!!!!!!!



README

This is your usual Rubik's cube. It gives you the cube and lets you scramble it and solve it. You have the ability to rotate any face one at a time.

I aimed to make the cube go through the moves accurately. With all 27 subcubes in a Rubiks Cube, a lot of data has to be managed to keep track of the position and rotation of the different cubes. To approach this, I had three position arrays that keep track of the x, y, and z positions respectivels of the different cubes. I also used an array that kept track of the rotation of the different cubes.

Using a global counter, I rotate the subcubes of the face being rotated and then transposed to the proper position.

The following keys control the cube.
z - rotate front face CCW
x - rotate front face CW
a - rotate middle face CCW
s - rotate middle face CW
q - rotate back face CCW
w - rotate back face CW

Insert - rotate left face CCW
Delete - rotate left face CW
Home - rotate middle verticle face CCW
End - rotate middle verticle face CW
Page Up - rotate back face CW
Page Down - rotate back face CCW

7 - rotate top face CW
8 - rotate top face CCW
4 - rotate middle horizontal face CCW
5 - rotate middle horizontal face CCW
1 - rotate bottom face CCW
2 - rotate bottom face CW

List of figures