Beispiel #1
0
        protected override GameCounterHistoryItem HandleIncrementB()
        {
            var npb = GameCountB + 1;

            if (SatisfiesSetEndingCondition(npb, GameCountA))
            {
                npb = -npb;
            }
            else
            {
                EnumTeams newServiceRight = CurrentServiceRight.Flip();
                return(new GameCounterHistoryItem(NormalGamePointCounterFactory.Create(newServiceRight), new TeamedValuePair <int>(GameCountA, npb), newServiceRight));
            }
            return(new GameCounterHistoryItem(null, new TeamedValuePair <int>(GameCountA, npb), CurrentServiceRight));
        }
Beispiel #2
0
        protected override GameCounterHistoryItem HandleIncrementB()
        {
            var npb = GameCountB + 1;

            if (CurrentPointCounter is TieBrakingPointCounter || SatisfiesGameEndingCondition(npb, GameCountA))
            {
                npb = -npb;
                return(new GameCounterHistoryItem(null, new TeamedValuePair <int>(GameCountA, npb), CurrentServiceRight));
            }
            else
            {
                var       newPoints = new TeamedValuePair <int>(GameCountA, npb);
                EnumTeams nsr       = CurrentServiceRight.Flip();
                return(SatisfiesTieBreakingCondition(npb, GameCountA)
                    ? new GameCounterHistoryItem(TieBreakingGamePointCounterFactory.Create(nsr), newPoints, nsr)
                    : new GameCounterHistoryItem(NormalGamePointCounterFactory.Create(nsr), newPoints, nsr));
            }
        }