Esempio n. 1
0
 public void EstablishContext()
 {
     _robot = new Robot(new Location(5, 5), "W");
     _robot.ExecuteInstruction(new TurnLeftCommand(_robot));
     _robot.ExecuteInstruction(new TurnLeftCommand(_robot));
     _robot.ExecuteInstruction(new MoveForwardCommand(_robot));
     _robot.ExecuteInstruction(new TurnRightCommand(_robot));
     _robot.ExecuteInstruction(new MoveForwardCommand(_robot));
     _robot.ExecuteInstruction(new TurnRightCommand(_robot));
     _robot.ExecuteInstruction(new MoveForwardCommand(_robot));
     _robot.ExecuteInstruction(new MoveForwardCommand(_robot));
     _robot.ExecuteInstruction(new TurnRightCommand(_robot));
 }