Click.java
/****************************************************************
     * Mouse Clicked - deals with marking cells as entitys & updates*
     ****the game board array; 0 - open space, 1 - wall, 3 - goal****
     ***************************************************************/
Mouse Clicked - deals with marking cells as entitys & updates
the game board array; 0 - open space, 1 - wall, 3 - goal
Mouse Clicked - deals with marking cells as entitys & updates the game board array ; 0 - open space 1 - wall 3 - goal
@Override
    public void mouseClicked(MouseEvent e) {
        int[][] updatedBoard = Grid.getBoard();
        if(inCellX() != -1 && inCellY() != -1){
            if(goalButtonPressed == true){
                updatedBoard[inCellX()][inCellY()] = 3;
                goalButtonPressed = false;
            }
            else if(startButtonPressed == true){
                updatedBoard[inCellX()][inCellY()] = 2;
                startButtonPressed = false;
            }
            else if(updatedBoard[inCellX()][inCellY()] == 0){
                updatedBoard[inCellX()][inCellY()] = 1;
            }
            else{
                updatedBoard[inCellX()][inCellY()] = 0;
            }
        }
        if(inCellX() != -1 && inCellY() != -1){
            System.out.println("The mouse is in cell " + inCellX() + ", " + inCellY());
        }    
        else{
            System.out.println("The pointer is not in any box");
        }
        /*********************************************************
        ****************Menu Button Click Events******************
        *********************************************************/
        if(mouseX >= 15 && mouseX < 228 && mouseY >= 15 && mouseY <  98){
        }
        if(mouseX >= 15 && mouseX < 228 && mouseY >= 105 && mouseY <  188){
            for (int i = 0; i < 25; i++){
                for (int j = 0; j < 25; j++){
                    updatedBoard[i][j] = 0;
                }
            }
        }
        if(mouseX >= 15 && mouseX < 228 && mouseY >= 194 && mouseY <  279 && goalButtonPressed == false){
            goalButtonPressed = true;
        }
        else if(mouseX >= 15 && mouseX < 228 && mouseY >= 194 && mouseY <  279){
            goalButtonPressed = false;
        }
        if(mouseX >= 15 && mouseX < 228 && mouseY >= 285 && mouseY <  368 && startButtonPressed == false){
            startButtonPressed = true;
        }
        else if(mouseX >= 15 && mouseX < 228 && mouseY >= 285 && mouseY <  368){
            startButtonPressed = false;
        }
    }
@ Override public void mouseClicked ( MouseEvent e ) { int [ ] [ ] updatedBoard = Grid . getBoard ( ) ; if ( inCellX ( ) != - 1 && inCellY ( ) != - 1 ) { if ( goalButtonPressed == true ) { updatedBoard [ inCellX ( ) ] [ inCellY ( ) ] = 3 ; goalButtonPressed = false ; } else if ( startButtonPressed == true ) { updatedBoard [ inCellX ( ) ] [ inCellY ( ) ] = 2 ; startButtonPressed = false ; } else if ( updatedBoard [ inCellX ( ) ] [ inCellY ( ) ] == 0 ) { updatedBoard [ inCellX ( ) ] [ inCellY ( ) ] = 1 ; } else { updatedBoard [ inCellX ( ) ] [ inCellY ( ) ] = 0 ; } } if ( inCellX ( ) != - 1 && inCellY ( ) != - 1 ) { System . out . println ( "The mouse is in cell " + inCellX ( ) + ", " + inCellY ( ) ) ; } else { System . out . println ( "The pointer is not in any box" ) ; } /*********************************************************
        ****************Menu Button Click Events******************
        *********************************************************/ if ( mouseX >= 15 && mouseX < 228 && mouseY >= 15 && mouseY < 98 ) { } if ( mouseX >= 15 && mouseX < 228 && mouseY >= 105 && mouseY < 188 ) { for ( int i = 0 ; i < 25 ; i ++ ) { for ( int j = 0 ; j < 25 ; j ++ ) { updatedBoard [ i ] [ j ] = 0 ; } } } if ( mouseX >= 15 && mouseX < 228 && mouseY >= 194 && mouseY < 279 && goalButtonPressed == false ) { goalButtonPressed = true ; } else if ( mouseX >= 15 && mouseX < 228 && mouseY >= 194 && mouseY < 279 ) { goalButtonPressed = false ; } if ( mouseX >= 15 && mouseX < 228 && mouseY >= 285 && mouseY < 368 && startButtonPressed == false ) { startButtonPressed = true ; } else if ( mouseX >= 15 && mouseX < 228 && mouseY >= 285 && mouseY < 368 ) { startButtonPressed = false ; } }
Mouse Clicked - deals with marking cells as entitys & updates
the game board array; 0 - open space, 1 - wall, 3 - goal
Mouse Clicked - deals with marking cells as entitys & updates the game board array ; 0 - open space 1 - wall 3 - goal
//execute algorithm
 //excecute
 //clear all placed entities
 //set goal state of algorithm
 //set start state of algorithm
