Exemplo 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)));
        }
Exemplo n.º 2
0
 public virtual bool IsGameBusted(int totalPoints, DartsSerie lastSerie)
 {
     return(false);
 }
Exemplo n.º 3
0
 public override bool IsGameBusted(int totalPoints, DartsSerie lastSerie)
 {
     return(
         !IsGameFinished(totalPoints, lastSerie) &&
         (totalPoints + lastSerie.GetSum() >= Limit - 1));
 }