I'm creating a Rubiks cube in Python and am running into the problem of checking whether 2 cubes are the same. I'm representing the sides of the cube as north, east, south, west, front, and back. I originally just had my function check if cube1.north = cube2.north, cube1.south = cube2.south, etc and if all where true then they are the same. This leaves out the cubes where cube1.north = cube2.south, cube1.south = cube2.north, etc. and many other scenarios where they are equal but the specific faces don't match up exactly. Does anyone have an idea on how to check if any 2 cubes are equal without tons of if statements for every possibility?
Why don't you try indexing the cube's faces according to which color they have at the center? Then you can just check whether the white-centered face on one cube matches the white-centered face on the other cube.
In other words, the north face will always have a white square at the center, the south face will always have a yellow square at the center, etc. Only operations that keep the orientation of the centers are allowed.
Python Rubiks Cube How to tell if 2 states are equal