add method

void add(
  1. Label lbl
)

Implementation

void add(Label lbl) {
  for (int i = 0; i < 2; i++) {
    for (int j = 1; j < 3; j++) {
      int loc = lbl.getLocationWithPosIndex(i, j);
      if (loc == Location.EXTERIOR || loc == Location.INTERIOR) {
        // initialize depth if it is null, otherwise add this location value
        if (isNull2(i, j)) {
          depth[i][j] = depthAtLocation(loc);
        } else
          depth[i][j] += depthAtLocation(loc);
      }
    }
  }
}