code: private void makeCellsFlowReady( int iteration, GridNode pitfillExitNode, List<GridNode> cellsToMakeFlowReady,
              BitMatrix allPitsPositions, WritableRandomIter pitIter, float delta ) {
          iteration++;
  
          double exitElevation = pitfillExitNode.elevation;
          List<GridNode> connected = new ArrayList<>();
          for( GridNode checkNode : cellsToMakeFlowReady ) {
              List<GridNode> validSurroundingNodes = checkNode.getValidSurroundingNodes();
              for( GridNode gridNode : validSurroundingNodes ) {
                  if (!pitfillExitNode.equals(gridNode) && allPitsPositions.isMarked(gridNode.col, gridNode.row)
                          && gridNode.elevation == exitElevation) {
                      if (!connected.contains(gridNode))
                          connected.add(gridNode);
                  }
              }
          }
          if (connected.size() == 0) {
              return;
          }
  
          for( GridNode gridNode : connected ) {
              double newElev = (double) (gridNode.elevation + delta * (double) iteration);
              gridNode.setValueInMap(pitIter, newElev);
          }
          List<GridNode> updatedConnected = new ArrayList<>();
          for( GridNode gridNode : connected ) {
              GridNode updatedNode = new GridNode(pitIter, gridNode.cols, gridNode.rows, gridNode.xRes, gridNode.yRes, gridNode.col,
                      gridNode.row);
              updatedConnected.add(updatedNode);
          }
          makeCellsFlowReady(iteration, pitfillExitNode, updatedConnected, allPitsPositions, pitIter, delta);
      }
docs: Make cells flow ready by creating a slope starting from the output cell.
  
  @param iteration the iteration.
  @param pitfillExitNode the exit node.
  @param cellsToMakeFlowReady the cells to check and change at each iteration.
  @param allPitsPositions the marked positions of all existing pits. Necessary to pick only those that
  really are part of the pit pool.
  @param pitIter elevation data.
  @param delta the elevation delta to add to the cells to create the slope.