Exemple #1
0
 private void Configure(RobotInput input)
 {
     _robotPositioningContext.AddPosition(input.InitialPosition);
     foreach (var command in input.Commands)
     {
         AddCommand(RobotCommandProvider.GetCommand(command, _robotPositioningContext));
     }
 }
Exemple #2
0
        public void Execute()
        {
            var position = GetCurrentPosition();

            for (var i = 0; i < _noOfSteps; i++)
            {
                var newPosition = AdjustPositionForSingleStep(position);
                RobotPositioningContext.AddPosition(newPosition);
            }
        }