private MoveDirection GetPrevious() { if (nextIndex == 0) { getDirection = GetNext; return(getDir()); } --nextIndex; return(getDir()); }
private MoveDirection GetNext() { if (nextIndex == directedSteps.Count - 1) { getDirection = GetPrevious; return(getDir()); } ++nextIndex; return(getDir()); }
public MoveDirection HandleObstacle(int stoppedStepLenght) { getDirection = invertDirectionChangingDir(); stepOffset = GetCurrentStep() - stoppedStepLenght; return(getDir()); }
public MoveUtilsSeqence(List <MoveLogical.MoveInfo> st) { directedSteps = st; getDirection = GetNext; }