Code/main.cpp
//Maze Menu Callback: Simple menu attached to right button
//Supports reset maze with all walls, construct maze with
//walls removed, find path through maze, and quit option
Maze Menu Callback: Simple menu attached to right button
Supports reset maze with all walls, construct maze with
walls removed, find path through maze, and quit option
Maze Menu Callback : Simple menu attached to right button Supports reset maze with all walls construct maze with walls removed find path through maze and quit option
void maze_menu(int id)
{
    if(id == 1) {
        maze->~Maze();
        maze = new Maze();;
        maze->drawInitWalls();
        glutPostRedisplay();
    }
    else if(id ==2) {
        maze->drawMaze();
        glutPostRedisplay();
    }
    else if (id ==3){
        maze->drawPath();
        glutPostRedisplay();
    }
    else if(id == 4) exit(0);
}
void maze_menu ( int id ) { if ( id == 1 ) { maze -> ~ Maze ( ) ; maze = new Maze ( ) ; ; maze -> drawInitWalls ( ) ; glutPostRedisplay ( ) ; } else if ( id == 2 ) { maze -> drawMaze ( ) ; glutPostRedisplay ( ) ; } else if ( id == 3 ) { maze -> drawPath ( ) ; glutPostRedisplay ( ) ; } else if ( id == 4 ) exit ( 0 ) ; }
Maze Menu Callback: Simple menu attached to right button
Supports reset maze with all walls, construct maze with
walls removed, find path through maze, and quit option
Maze Menu Callback : Simple menu attached to right button Supports reset maze with all walls construct maze with walls removed find path through maze and quit option
//Reset the array and randomly populate //Exit the program