public int CalculateScore(BlackjackMainViewModel model)
 {
     if (model.SelectedYet == false)
     {
         if (SecondCard !.Points == 0)
         {
             throw new BasicBlankException("Cannot have 0 points.  Find out what happened");
         }
         return(SecondCard.Points);
     }
     if (_mVarComputer == false)
     {
         if (HandList.Any(Items => Items.Points == 0))
         {
             throw new BasicBlankException("A card cannot be worth 0 points.  find out what happened");
         }
     }
     return(HandList.Sum(Items => Items.Points));
 }
Пример #2
0
 public int TotalPoints() => HandList.Sum(items => items.Points);