Пример #1
0
 public void GetWinner(Footballer fk1, Footballer fk2, PlaygroundFootballHandler del)
 {
     _del = del;
     if (fk1.GetIntGoals() > fk2.GetIntGoals())
     {
         if (_del != null)
         {
             _del($"\n\n{fk1.Name} is winner \n\n\n");
         }
     }
     else
     {
         if (fk2.GetIntGoals() > fk1.GetIntGoals())
         {
             if (_del != null)
             {
                 _del($"\n\n{fk2.Name} is winner \n\n\n");
             }
         }
         else
         {
             if (fk1.GetIntGoals() == fk2.GetIntGoals())
             {
                 if (_del != null)
                 {
                     _del("\n\nDraw game!\n\n\n");
                 }
             }
         }
     }
 }
Пример #2
0
 public void FinalScore(Footballer fk1, Footballer fk2, PlaygroundFootballHandler del)
 {
     _del = del;
     if (_del != null)
     {
         _del($"\n\n{fk1.Name} scored {fk1.GetIntGoals()} goals");
         _del($"{fk2.Name} scored {fk2.GetIntGoals()} goals\n\n\n");
     }
 }