Esempio n. 1
0
 public AdvantageSetGameCounter(IParametricFactory <IPointCounter, EnumTeams> normalGamePointCounterFactory, int leastWinningGames, int leastWinningDifference, EnumTeams initialServiceRight)
     : base(normalGamePointCounterFactory?.Create(initialServiceRight) ?? throw new ArgumentNullException(nameof(normalGamePointCounterFactory)), initialServiceRight)
 {
     NormalGamePointCounterFactory = normalGamePointCounterFactory ?? throw new ArgumentNullException(nameof(normalGamePointCounterFactory));
     LeastWinningGames             = leastWinningGames > 0 ? leastWinningGames :
                                     throw new ArgumentOutOfRangeException(nameof(leastWinningGames), $"The leastWinningGames must be grater than 0!");
     LeastWinningDifference = leastWinningDifference >= 0 ? leastWinningDifference :
                              throw new ArgumentOutOfRangeException(nameof(leastWinningDifference), $"The leastWinningGames must be grater than or equal to 0!");
 }
Esempio n. 2
0
 public TieBreakSetGameCounter(IParametricFactory <IPointCounter, EnumTeams> normalGamePointCounterFactory,
                               IParametricFactory <TieBrakingPointCounter, EnumTeams> tieBreakingGamePointCounterFactory, int leastWinningGames, int baseWinningDifference, EnumTeams initialServiceRight)
     : base(normalGamePointCounterFactory?.Create(initialServiceRight) ?? throw new ArgumentNullException(nameof(normalGamePointCounterFactory)), initialServiceRight)
 {
     NormalGamePointCounterFactory      = normalGamePointCounterFactory ?? throw new ArgumentNullException(nameof(normalGamePointCounterFactory));
     TieBreakingGamePointCounterFactory = tieBreakingGamePointCounterFactory ?? throw new ArgumentNullException(nameof(tieBreakingGamePointCounterFactory));
     LeastWinningGames     = leastWinningGames;
     BaseWinningDifference = baseWinningDifference;
 }
Esempio n. 3
0
 public StandardSetCounter(IParametricFactory <IGameCounter, EnumTeams> gameCounterFactory, int totalSets, EnumTeams initialServiceRight)
     : base(gameCounterFactory?.Create(initialServiceRight) ?? throw new ArgumentNullException(nameof(gameCounterFactory)), initialServiceRight)
 {
     GameCounterFactory = gameCounterFactory ?? throw new ArgumentNullException(nameof(gameCounterFactory));
     TotalSets          = totalSets;
 }
 public MatchTieBreakSetCounter(IParametricFactory <IGameCounter, EnumTeams> gameCounterFactory, int totalSets, int matchTieBreakPointCount,
                                int matchTieBreakPointLeastDifference, EnumTeams initialServiceRight) : base(gameCounterFactory.Create(initialServiceRight) ??
                                                                                                             throw new ArgumentNullException(nameof(gameCounterFactory)), initialServiceRight)
 {
     GameCounterFactory                = gameCounterFactory ?? throw new ArgumentNullException(nameof(gameCounterFactory));
     TotalSets                         = totalSets;
     MatchTieBreakPointCount           = matchTieBreakPointCount;
     MatchTieBreakPointLeastDifference = matchTieBreakPointLeastDifference;
 }