Esempio n. 1
0
        public override bool IsGameFinished(int totalPoints, DartsSerie lastSerie)
        {
            var lastThrow = lastSerie.Throws.OrderBy(t => t.Number).LastOrDefault(t => t.GetSum() > 0);

            return(lastThrow != null && (
                       (totalPoints + lastSerie.GetSum() == Limit) &&
                       (lastThrow.Score.IsDouble)));
        }
Esempio n. 2
0
 public virtual bool IsGameBusted(int totalPoints, DartsSerie lastSerie)
 {
     return(false);
 }
Esempio n. 3
0
 public override bool IsGameBusted(int totalPoints, DartsSerie lastSerie)
 {
     return(
         !IsGameFinished(totalPoints, lastSerie) &&
         (totalPoints + lastSerie.GetSum() >= Limit - 1));
 }