src/Controller/controllerOperation.cpp
/**
 * Auto click block around according flag surrounding.
 */
Auto click block around according flag surrounding.
Auto click block around according flag surrounding .
void Controller::Controller::hint() {
    uint8_t flagAround =
            MapGenerator::typeAround(this->cursor.x, this->cursor.y,
                                     this->getShowedField().get(), MapGenerator::BLOCKTYPE::FLAGGED);
    if (flagAround == (*this->getMineField()->GetMap())[this->cursor.x][this->cursor.y]) {
        for (int i = -1; i <= 1; ++i) {
            for (int j = -1; j <= 1; ++j) {
                if (!(i == 0 && j == 0))
                    click(this->cursor.x + i, this->cursor.y + j);
            }
        }
    } else {
    }
}
void Controller :: Controller :: hint ( ) { uint8_t flagAround = MapGenerator :: typeAround ( this -> cursor . x , this -> cursor . y , this -> getShowedField ( ) . get ( ) , MapGenerator :: BLOCKTYPE :: FLAGGED ) ; if ( flagAround == ( * this -> getMineField ( ) -> GetMap ( ) ) [ this -> cursor . x ] [ this -> cursor . y ] ) { for ( int i = -1 ; i <= 1 ; ++ i ) { for ( int j = -1 ; j <= 1 ; ++ j ) { if ( ! ( i == 0 && j == 0 ) ) click ( this -> cursor . x + i , this -> cursor . y + j ) ; } } } else { } }
Auto click block around according flag surrounding.
Auto click block around according flag surrounding .
// hint failed