CPD Results

The following document contains the results of PMD's CPD 3.7.

Duplications

FileLine
de\jos\game\logic\NInARowValidator.java27
de\jos\game\logic\NInARowValidator.java63
        for (int x = LEFT_BORDER; x < BOARD_WIDTH_X - RIGHT_BORDER; x++) {
          if (lastColor != null) {
            if (board[x][y] == null) {
              lastColor = null;
              count = 0;
            } else {
              if (board[x][y].getColor().equals(lastColor)) {
                count++;
              } else {
                lastColor = board[x][y].getColor();
                count = 1;
              }
            }
          } else {
            if (board[x][y] != null) {
              lastColor = board[x][y].getColor();
              count = 1;
            }
          }

          if (count == requiredAlignedBullets) {
            xNInARow = x;
            yNInARow = y;
            count = 0;
          }
        }