src/main/java/cz/educanet/minesweeper/logic/Minesweeper.java
public boolean didWin() {
        int flagCount = 0;
        for (int i = 0; i < rowsCount; i++) {
            for (int j = 0; j < columnsCount; j++) {
                if (pitchState[i][j] == 2)
                    flagCount++;
                if (!isBombOnPosition(i, j) && pitchState[i][j] == 2)
                    return false;
            }
        }
        if (flagCount == 0)
            return false;
        return true;
    }
/**
     * returns true if every flag is on a bomb, else false
     *
     * @return if player won
     */
returns true if every flag is on a bomb, else false
@return if player won
returns true if every flag is on a bomb else false @return if player won
public boolean didWin() {
        int flagCount = 0;
        for (int i = 0; i < rowsCount; i++) {
            for (int j = 0; j < columnsCount; j++) {
                if (pitchState[i][j] == 2)
                    flagCount++;
                if (!isBombOnPosition(i, j) && pitchState[i][j] == 2)
                    return false;
            }
        }
        if (flagCount == 0)
            return false;
        return true;
    }
public boolean didWin ( ) { int flagCount = 0 ; for ( int i = 0 ; i < rowsCount ; i ++ ) { for ( int j = 0 ; j < columnsCount ; j ++ ) { if ( pitchState [ i ] [ j ] == 2 ) flagCount ++ ; if ( ! isBombOnPosition ( i , j ) && pitchState [ i ] [ j ] == 2 ) return false ; } } if ( flagCount == 0 ) return false ; return true ; }
returns true if every flag is on a bomb, else false
 @return if player won
returns true if every flag is on a bomb else false @return if player won