public boolean isFinished() {
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols - 1; j++) {
                if (board[i][j] * board[i][j + 1] == 0) {
                    // First return statement
                    return false;
                }
                if (board[i][j] == board[i][j + 1]) {
                    // Second return statement
                    return false;
                }
            }
        }
        for (int i = 0; i < cols; i++) {
            for (int j = 0; j < rows - 1; j++) {
                if (board[j][i] * board[j + 1][i] == 0) {
                    // Third return statement 
                    return false;
                }
                if (board[j][i] == board[j + 1][i]) {
                    // Fourth return statement
                    return false;
                }
            }
        }
        // Fifth return statemnt 
        return true;
    }