Final-Project-Group6/src/Maze/maze.cpp
//initializing wall matrix
// Maze class Constructor
initializing wall matrix
Maze class Constructor
initializing wall matrix Maze class Constructor
fp::Maze::Maze()
{
    fp::API::setColor(0,0,'w');
    fp::API::setText(0,0,"Start");
    fp::API::setColor(7,7,'w');
    fp::API::setText(7,7,"Goal");
    fp::API::setColor(7,8,'w');
    fp::API::setText(7,8,"Goal");
    fp::API::setColor(8,7,'w');
    fp::API::setText(8,7,"Goal");
    fp::API::setColor(8,8,'w');
    fp::API::setText(8,8,"Goal");
    for(int i = 0; i < 16; i++) { 
        for(int j = 0; j < 16; j++) { 
            if(i == 0) {
                westwall_[i][j] = true;
                fp::API::setWall(i, j, 'w'); 
            }
            if(i == 15) {
                eastwall_[i][j] = true;
                fp::API::setWall(i, j, 'e'); 
            }
            if(j == 0){
                 southwall_[i][j] = true;
                 fp::API::setWall(i, j, 's'); 
            }
            if(j == 15){
                 northwall_[i][j] = true;
                 fp::API::setWall(i, j, 'n'); 
            }   
            if(i != 0 && j != 0 && i != 15 && j != 15) 
            { 
                northwall_[i][j] = false;
                eastwall_[i][j] = false;
                westwall_[i][j] = false;
                southwall_[i][j] = false;
            }
        }
    }
}
fp :: Maze :: Maze ( ) { fp :: API :: setColor ( 0 , 0 , ' ' ) ; fp :: API :: setText ( 0 , 0 , " " ) ; fp :: API :: setColor ( 7 , 7 , ' ' ) ; fp :: API :: setText ( 7 , 7 , " " ) ; fp :: API :: setColor ( 7 , 8 , ' ' ) ; fp :: API :: setText ( 7 , 8 , " " ) ; fp :: API :: setColor ( 8 , 7 , ' ' ) ; fp :: API :: setText ( 8 , 7 , " " ) ; fp :: API :: setColor ( 8 , 8 , ' ' ) ; fp :: API :: setText ( 8 , 8 , " " ) ; for ( int i = 0 ; i < 16 ; i ++ ) { for ( int j = 0 ; j < 16 ; j ++ ) { if ( i == 0 ) { westwall_ [ i ] [ j ] = true ; fp :: API :: setWall ( i , j , ' ' ) ; } if ( i == 15 ) { eastwall_ [ i ] [ j ] = true ; fp :: API :: setWall ( i , j , ' ' ) ; } if ( j == 0 ) { southwall_ [ i ] [ j ] = true ; fp :: API :: setWall ( i , j , ' ' ) ; } if ( j == 15 ) { northwall_ [ i ] [ j ] = true ; fp :: API :: setWall ( i , j , ' ' ) ; } if ( i != 0 && j != 0 && i != 15 && j != 15 ) { northwall_ [ i ] [ j ] = false ; eastwall_ [ i ] [ j ] = false ; westwall_ [ i ] [ j ] = false ; southwall_ [ i ] [ j ] = false ; } } } }
initializing wall matrix
Maze class Constructor
initializing wall matrix Maze class Constructor
// All walls except boundary walls are initialized as false  // Looping in x-axis // Looping in y-axis // Left Boundary // Rigth Boundary // Bottom Boundary // Top Boundary // All other walls