C++ Rubik's Cube solving program