If someone rotated a corner of the cube before giving it to me, perhaps as a prank, this isn't caught by the current codebase; it just hangs indefinitely.
>>> from rubik.cube import Cube
>>> from rubik.solve import Solver
>>> s = Solver(Cube('orwowgwywgbgrgrbobowyggbrrbybrgowoygryrbbgoobyoyrywyww'.upper()))
>>> s.solve()
^C…
For other non-solvable states, such as a flipped edge, the code does catch these.
But when it comes to rotated corners, it just enters an infinite loop.
If someone rotated a corner of the cube before giving it to me, perhaps as a prank, this isn't caught by the current codebase; it just hangs indefinitely.
For other non-solvable states, such as a flipped edge, the code does catch these.
But when it comes to rotated corners, it just enters an infinite loop.