code: private void takeNextStep(int lastStep, int nextStep)
      {
          if (!pathStoppedRequested)
          {
              removeObjectId(path.getX(lastStep), path.getY(lastStep));
              assignObjectId(path.getX(nextStep), path.getY(nextStep));
          }
      }
docs: Update the next step has it is free.
  
  @param lastStep The last step.
  @param nextStep The next step.