code: private int getMaxStep()
      {
          if (path != null)
          {
              final int steps;
              if (pathStopped)
              {
                  steps = currentStep;
              }
              else
              {
                  steps = path.getLength();
              }
              return steps;
          }
          return 0;
      }
docs: Get total number of steps.
  
  @return The total number of steps.