src/Controller/controllerOperation.cpp
/**
 * This function is just a temporary solution to make output.
 * @param controller
 */
This function is just a temporary solution to make output.
@param controller
This function is just a temporary solution to make output . @param controller
void Controller::Controller::showMap() {
    auto map = this->getShowedField()->GetMap();
    auto row = this->getMineField()->GetRow();
    auto line = this->getMineField()->GetLine();
    system("cls");
    for (int i = 0; i < row; ++i) {
        for (int j = 0; j < line; ++j) {
            uint8_t blockValue = (*map)[i][j];
            if (blockValue == MapGenerator::BLOCKTYPE::UNREVEALED)
                printf("  @");
            else if (blockValue == MapGenerator::BLOCKTYPE::FLAGGED)
                printf("  f");
            else if (blockValue == MapGenerator::BLOCKTYPE::QUESTIONED)
                printf("  ?");
            else if (blockValue == 0)
                printf("   ");
            else
                printf("%3d", (*map)[i][j]);
        }
        std::cout << std::endl;
    }
    std::cout << std::endl;
}
void Controller :: Controller :: showMap ( ) { auto map = this -> getShowedField ( ) -> GetMap ( ) ; auto row = this -> getMineField ( ) -> GetRow ( ) ; auto line = this -> getMineField ( ) -> GetLine ( ) ; system ( " " ) ; for ( int i = 0 ; i < row ; ++ i ) { for ( int j = 0 ; j < line ; ++ j ) { uint8_t blockValue = ( * map ) [ i ] [ j ] ; if ( blockValue == MapGenerator :: BLOCKTYPE :: UNREVEALED ) printf ( " " ) ; else if ( blockValue == MapGenerator :: BLOCKTYPE :: FLAGGED ) printf ( " " ) ; else if ( blockValue == MapGenerator :: BLOCKTYPE :: QUESTIONED ) printf ( " " ) ; else if ( blockValue == 0 ) printf ( " " ) ; else printf ( " " , ( * map ) [ i ] [ j ] ) ; } std :: cout << std :: endl ; } std :: cout << std :: endl ; }
This function is just a temporary solution to make output.
This function is just a temporary solution to make output .