Board.java
/*
     * Description: method for when a cell in the Cell[][] of a Board object is 
     * clicked, returns without doing anything if game is lost or won. Uses mouse
     * x and y coordinates to find cell that has been clicked, if first click calls
     * place() on the calling Board. Calls emptyAdjacents using the Cell[][] and the
     * clicked cell coordinates as inputs, then assigns the mine state of the 
     * clicked cell to the output boolean of the function.
     * Input: N/A, only called on a Board object.
     * Output: a single boolean mine, the mine state of the cell being clicked from
     * the Board Cell[][].
     */
method for when a cell in the Cell[][] of a Board object is
clicked, returns without doing anything if game is lost or won. Uses mouse
x and y coordinates to find cell that has been clicked, if first click calls
place() on the calling Board. Calls emptyAdjacents using the Cell[][] and the
clicked cell coordinates as inputs, then assigns the mine state of the
clicked cell to the output boolean of the function.
Input: N/A, only called on a Board object.
Output: a single boolean mine, the mine state of the cell being clicked from
the Board Cell[][].
method for when a cell in the Cell [] [] of a Board object is clicked returns without doing anything if game is lost or won . Uses mouse x and y coordinates to find cell that has been clicked if first click calls place () on the calling Board . Calls emptyAdjacents using the Cell [] [] and the clicked cell coordinates as inputs then assigns the mine state of the clicked cell to the output boolean of the function . Input : N / A only called on a Board object . Output : a single boolean mine the mine state of the cell being clicked from the Board Cell [] [] .
public boolean clickedCell() {
        boolean mine = false;
        if (this.lost || this.won) {
            return mine;
        }
        double clickX = PennDraw.mouseX();
        double clickY = PennDraw.mouseY();
        for (int i = 0; i < cells.length; i++) {
            for (int j = 0; j < cells[0].length; j++) {
                if (clickX < i + 1 && clickY < j + 1 && clickX > i && clickY > j) {
                    if (this.first) {
                        this.firstClicked = this.cells[i][j];
                        this.place();
                    }
                    emptyAdjacents(cells, i, j);
                    mine = cells[i][j].mineGet();
                }
            }
        }
        return mine;
    }
public boolean clickedCell ( ) { boolean mine = false ; if ( this . lost || this . won ) { return mine ; } double clickX = PennDraw . mouseX ( ) ; double clickY = PennDraw . mouseY ( ) ; for ( int i = 0 ; i < cells . length ; i ++ ) { for ( int j = 0 ; j < cells [ 0 ] . length ; j ++ ) { if ( clickX < i + 1 && clickY < j + 1 && clickX > i && clickY > j ) { if ( this . first ) { this . firstClicked = this . cells [ i ] [ j ] ; this . place ( ) ; } emptyAdjacents ( cells , i , j ) ; mine = cells [ i ] [ j ] . mineGet ( ) ; } } } return mine ; }
Description: method for when a cell in the Cell[][] of a Board object is
 clicked, returns without doing anything if game is lost or won.
Description : method for when a cell in the Cell [] [] of a Board object is clicked returns without doing anything if game is lost or won .
// do nothing if a mine was clicked/game is lost
 // find cell that was clicked
 // first click condition for placement
 // behavior for interaction between cells
 // used to check if clicked cell is mine in MineSweeper.java
