docs: private int distBetweenPoints(int x1, int z1, int x2, int z2, boolean bAllowDiags)
      {
          // Total cells is the sum of the distances we need to travel along the x and the z axes, plus one for the end cell.
          int w = Math.abs(x2 - x1);
          int h = Math.abs(z2 - z1);
          if (bAllowDiags)
          {
              // Diagonal movement allows us ignore the shorter of w and h:
              if (w < h)
                  w = 0;
              else
                  h = 0;
          }
          return w + h + 1;
      }