software/components/solving/src/Algorithm.cpp
void Algorithm::mvCorr() {
    if(openF){  // dead end, has rotated, move forward.
        out[0] = 0;
        out[1] = 1;
    }else if(openL || openR){   // corner, left or right is open.
        if(openL){  // rotate left
            out[0] = 2;
            out[1] = 90;
        }else{  // rotate right
            out[0] = 2;
            out[1] = -90;
        }
    }else{
        cout << "Algorithm::mvCorr(): Invalid boolean set " << openL << "|" << openF << "|" << openR << endl;
    }
}
// precondition: if only one direction is open
if only one direction is open
if only one direction is open
void Algorithm::mvCorr() {
    if(openF){  
        out[0] = 0;
        out[1] = 1;
    }else if(openL || openR){   
        if(openL){  
            out[0] = 2;
            out[1] = 90;
        }else{  
            out[0] = 2;
            out[1] = -90;
        }
    }else{
        cout << "Algorithm::mvCorr(): Invalid boolean set " << openL << "|" << openF << "|" << openR << endl;
    }
}
void Algorithm :: mvCorr ( ) { if ( openF ) { out [ 0 ] = 0 ; out [ 1 ] = 1 ; } else if ( openL || openR ) { if ( openL ) { out [ 0 ] = 2 ; out [ 1 ] = 90 ; } else { out [ 0 ] = 2 ; out [ 1 ] = -90 ; } } else { cout << " " << openL << " " << openF << " " << openR << endl ; } }
precondition: if only one direction is open
precondition : if only one direction is open
// dead end, has rotated, move forward. // corner, left or right is open. // rotate left // rotate right