Example #1
0
        public ICanNavigate NavigateForwardTo(int index)
        {
            ICanNavigate target = this;

            while (index > 0)
            {
                target = target.NavigateForward;
                index--;
            }

            return(target);
        }
Example #2
0
 public MarsRoverSquadControl(IOutput output)
 {
     _output           = output;
     _navigationSystem = new NavigationSystem();
 }
Example #3
0
 public Rover(Position startingPosition, IOutput output, ICanNavigate navigationSystem)
 {
     _output           = output;
     _navigationSystem = navigationSystem;
     CurrentPosition   = startingPosition;
 }