Rubik's cube simulation