Пример #1
0
 public static bool Fight(IFighter hitFighter, IFighter getFighter)
 {
     getFighter.LowHealth(hitFighter.GetDammageValue());
     Console.WriteLine($"{getFighter.GetName()}'s dammage: {hitFighter.GetDammageValue()}");
     if (getFighter.GetHealth() <= 0)
     {
         Console.WriteLine($"{hitFighter.GetName()} win!!!");
         Console.ReadLine();
     }
     else
     {
         Console.WriteLine($"{getFighter.GetName()}'s health: {getFighter.GetHealth()}");
     }
     return(getFighter.GetHealth() <= 0);
 }