public void ExecuteActionTest(Action action, int expectedResult)
        {
            var robotActions = new RobotActions(_robot, _actionStrength);

            robotActions.SetAction(action);
            var result = robotActions.GetResult();

            Assert.AreEqual(expectedResult, result);
        }
 public override void HandleRequest(Action action, int result)
 {
     if (action == Action.Rest)
     {
         Console.WriteLine($"Robot restored {result} healpoints.");
     }
     else
     {
         Console.WriteLine("Unexpected robot behavior...");
     }
 }
 public override void HandleRequest(Action action, int result)
 {
     if (action == Action.Defence)
     {
         Console.WriteLine("Robot switched to the defence position.");
     }
     else if (Successor != null)
     {
         Successor.HandleRequest(action, result);
     }
 }
 public override void HandleRequest(Action action, int result)
 {
     if (action == Action.Attack)
     {
         Console.WriteLine($"Robot made {result} damage.");
     }
     else if (Successor != null)
     {
         Successor.HandleRequest(action, result);
     }
 }
 public void SetAction(Action action)
 {
     _action = action;
 }
 public abstract void HandleRequest(Action action, int result);