hw/hw2/hw2/Percolation.java
public void open(int row, int col) {
        // validate whether index is legal
        validate(row);
        validate(col);

        // Check whether it is open
        if (!isOpen(row, col)) {
            grid[row][col] = 1;
            numOfOpen += 1;
            Connect(row, col);
            status[row][col] = true;
        }
    }
/** open the site (row, col) if it is not open already. */
open the site (row, col) if it is not open already.
open the site ( row col ) if it is not open already .
public void open(int row, int col) {
        validate(row);
        validate(col);
        if (!isOpen(row, col)) {
            grid[row][col] = 1;
            numOfOpen += 1;
            Connect(row, col);
            status[row][col] = true;
        }
    }
public void open ( int row , int col ) { validate ( row ) ; validate ( col ) ; if ( ! isOpen ( row , col ) ) { grid [ row ] [ col ] = 1 ; numOfOpen += 1 ; Connect ( row , col ) ; status [ row ] [ col ] = true ; } }
open the site (row, col) if it is not open already.
open the site ( row col ) if it is not open already .
// validate whether index is legal // Check whether it is open