code: private void addPitToStack( int row, int col ) {
          currentPitsCount = currentPitsCount + 1;
          if (currentPitsCount >= pitsStackSize) {
              pitsStackSize = (int) (pitsStackSize + nCols * nRows * .1) + 2;
              currentPitRows = realloc(currentPitRows, pitsStackSize);
              currentPitCols = realloc(currentPitCols, pitsStackSize);
              dn = realloc(dn, pitsStackSize);
          }
  
          currentPitRows[currentPitsCount] = row;
          currentPitCols[currentPitsCount] = col;
      }
docs: Adds a pit position to the stack.
  
  @param row the row of the pit.
  @param col the col of the pit.