protected CancellableGameCounterBase(IPointCounter initialPointCounter, EnumTeams initialServiceRight) { GameCountA = GameCountB = 0; CurrentPointCounter = initialPointCounter ?? throw new ArgumentNullException(nameof(initialPointCounter)); History = new Stack <GameCounterHistoryItem>(); CurrentServiceRight = initialServiceRight; PushHistory(new GameCounterHistoryItem(initialPointCounter, new TeamedValuePair <int>(0, 0), initialServiceRight)); }
public void Deconstruct(out IPointCounter pointCounter, out TeamedValuePair <int> gameCounts, out EnumTeams serviceRight) { pointCounter = Counter; gameCounts = GameCounts; serviceRight = ServiceRight; }
public MatchTieBreakFinalSetGameCounter(IPointCounter initialPointCounter, EnumTeams initialServiceRight) : base(initialPointCounter, initialServiceRight) { }
public GameCounterHistoryItem(IPointCounter counter, TeamedValuePair <int> gameCounts, EnumTeams serviceRight) { Counter = counter; GameCounts = gameCounts; ServiceRight = serviceRight; }
public IParametricFactory <MatchTieBreakFinalSetGameCounter, EnumTeams> CreateFactory(IPointCounter initialPointCounter) => Extensions.CreateParametricFactory <MatchTieBreakFinalSetGameCounter, EnumTeams>(isr => new MatchTieBreakFinalSetGameCounter(initialPointCounter, isr));