src/Controller/controllerOperation.cpp
/**
 * Do "flag" block operation.
 * If this is a "unflagged" block then flag it and vice versa.
 */
Do "flag" block operation.
If this is a "unflagged" block then flag it and vice versa.
Do " flag " block operation . If this is a " unflagged " block then flag it and vice versa .
void Controller::Controller::flag() {
    uint8_t blockValue = (*this->getShowedField()->GetMap())[this->cursor.x][this->cursor.y];
    if (blockValue == MapGenerator::BLOCKTYPE::UNREVEALED) {
        (*this->getShowedField()->GetMap())[this->cursor.x][this->cursor.y] = MapGenerator::BLOCKTYPE::FLAGGED;
    } else if (blockValue == MapGenerator::BLOCKTYPE::FLAGGED) {
        (*this->getShowedField()->GetMap())[this->cursor.x][this->cursor.y] = MapGenerator::BLOCKTYPE::UNREVEALED;
    }
}
void Controller :: Controller :: flag ( ) { uint8_t blockValue = ( * this -> getShowedField ( ) -> GetMap ( ) ) [ this -> cursor . x ] [ this -> cursor . y ] ; if ( blockValue == MapGenerator :: BLOCKTYPE :: UNREVEALED ) { ( * this -> getShowedField ( ) -> GetMap ( ) ) [ this -> cursor . x ] [ this -> cursor . y ] = MapGenerator :: BLOCKTYPE :: FLAGGED ; } else if ( blockValue == MapGenerator :: BLOCKTYPE :: FLAGGED ) { ( * this -> getShowedField ( ) -> GetMap ( ) ) [ this -> cursor . x ] [ this -> cursor . y ] = MapGenerator :: BLOCKTYPE :: UNREVEALED ; } }
Do "flag" block operation.
Do " flag " block operation .