depthFactor static method
Computes the factor for the change in depth when moving from one location to another. E.g. if crossing from the INTERIOR to the EXTERIOR the depth decreases, so the factor is -1
Implementation
static int depthFactor(int currLocation, int nextLocation) {
if (currLocation == Location.EXTERIOR && nextLocation == Location.INTERIOR)
return 1;
else if (currLocation == Location.INTERIOR &&
nextLocation == Location.EXTERIOR) return -1;
return 0;
}