private int checkDiagonal(byte[][] arr, int startIndex, int mark) {
        int countOfEmptyField = 0;
        int countOfBusyField = 0;
        int emptyIndex = -1;
        int j;
        for (int i = 0; i < arr.length; i++) {
            if (startIndex == 0) {
                j = i;
            } else {
                j = startIndex - i;
            }
            if (arr[i][j] == mark)
                countOfBusyField++;
            else if (arr[i][j] == GameBoard.EMPTY) {
                countOfEmptyField++;
                emptyIndex = i;
            }
        }
        if (countOfEmptyField == 1 && countOfBusyField == 2)
            return emptyIndex;
        return -1;
    }