src/main.cpp
/**
 * Processes keyboard input and either rotates a cube
 * face accordingly or solves/shuffles a cube.
 * @param key: keyboard input
 * @param x, y: mouse coordinates at time of keypress
 */
Processes keyboard input and either rotates a cube
face accordingly or solves/shuffles a cube.
@param key: keyboard input
@param x, y: mouse coordinates at time of keypress
Processes keyboard input and either rotates a cube face accordingly or solves / shuffles a cube . @param key : keyboard input @param x y : mouse coordinates at time of keypress
void myKeyboardFunc(unsigned char key, int x, int y) {
    UNUSED(x);
    UNUSED(y);
    switch (key) {
        case 'x':
            if (moves.empty()) moves = cube->scramble(scrambleDepth);
            break;
        case 'l':
            return rotateCube(L, Ninety);
        case 'L':
            return rotateCube(L, TwoSeventy);
        case 'r':
            return rotateCube(R, Ninety);
        case 'R':
            return rotateCube(R, TwoSeventy);
        case 'u':
            return rotateCube(U, Ninety);
        case 'U':
            return rotateCube(U, TwoSeventy);
        case 'd':
            return rotateCube(D, Ninety);
        case 'D':
            return rotateCube(D, TwoSeventy);
        case 'f':
            return rotateCube(F, Ninety);
        case 'F':
            return rotateCube(F, TwoSeventy);
        case 'b':
            return rotateCube(B, Ninety);
        case 'B':
            return rotateCube(B, TwoSeventy);
        case 'm':
            return rotateCube(M, Ninety);
        case 'M':
            return rotateCube(M, TwoSeventy);
        case 'e':
            return rotateCube(E, Ninety);
        case 'E':
            return rotateCube(E, TwoSeventy);
        case 's':
            return rotateCube(S, Ninety);
        case 'S':
            return rotateCube(S, TwoSeventy);
        case 't':
            solve();
            break;
        case 'q':
            exit(0);
        default:
            break;
    }
    glutPostRedisplay();
}
void myKeyboardFunc ( unsigned char key , int x , int y ) { UNUSED ( x ) ; UNUSED ( y ) ; switch ( key ) { case ' ' : if ( moves . empty ( ) ) moves = cube -> scramble ( scrambleDepth ) ; break ; case ' ' : return rotateCube ( L , Ninety ) ; case ' ' : return rotateCube ( L , TwoSeventy ) ; case ' ' : return rotateCube ( R , Ninety ) ; case ' ' : return rotateCube ( R , TwoSeventy ) ; case ' ' : return rotateCube ( U , Ninety ) ; case ' ' : return rotateCube ( U , TwoSeventy ) ; case ' ' : return rotateCube ( D , Ninety ) ; case ' ' : return rotateCube ( D , TwoSeventy ) ; case ' ' : return rotateCube ( F , Ninety ) ; case ' ' : return rotateCube ( F , TwoSeventy ) ; case ' ' : return rotateCube ( B , Ninety ) ; case ' ' : return rotateCube ( B , TwoSeventy ) ; case ' ' : return rotateCube ( M , Ninety ) ; case ' ' : return rotateCube ( M , TwoSeventy ) ; case ' ' : return rotateCube ( E , Ninety ) ; case ' ' : return rotateCube ( E , TwoSeventy ) ; case ' ' : return rotateCube ( S , Ninety ) ; case ' ' : return rotateCube ( S , TwoSeventy ) ; case ' ' : solve ( ) ; break ; case ' ' : exit ( 0 ) ; default : break ; } glutPostRedisplay ( ) ; }
Processes keyboard input and either rotates a cube
 face accordingly or solves/shuffles a cube.
Processes keyboard input and either rotates a cube face accordingly or solves / shuffles a cube .
// Don't need mouse coordinates