Ejemplo n.º 1
0
 private void WhoIsWinner(Person first, Person second)
 {
     if (first.Hand.IsItDefeat() && !second.Hand.IsItDefeat())
     {
         Output.Winner(second.Name);
     }
     else if (second.Hand.IsItDefeat() && !first.Hand.IsItDefeat())
     {
         Output.Winner(first.Name);
     }
     else
     {
         if (first.Hand.CheckSum() > second.Hand.CheckSum())
         {
             Output.Winner(first.Name);
         }
         else if (first.Hand.CheckSum() < second.Hand.CheckSum())
         {
             Output.Winner(second.Name);
         }
         else if (first.Hand.CheckSum() == second.Hand.CheckSum())
         {
             Output.Winner("Nobody");
         }
     }
 }