Esempio n. 1
0
 public void Dispatch(Rover rover, string instructions)
 {
     foreach (var instruction in instructions)
     {
         if (instruction == Move)
         {
             rover.Move();
         }
         else if (instruction == Left)
         {
             rover.Left();
         }
         else if (instruction == Right)
         {
             rover.Right();
         }
     }
 }
 public void Dispatch(Rover rover, string instructions)
 {
     foreach (var instruction in instructions)
     {
         if (instruction == Move)
         {
             rover.Move();
         }
         else if (instruction == Left)
         {
             rover.Left();
         }
         else if (instruction == Right)
         {
             rover.Right();
         }
     }
 }