protected override SetCounterHistoryItem HandleIncrementB() { var npb = SetCountB + 1; if (SatisfiesMatchEndingCondition(npb, SetCountA)) { npb = -npb; } else { var nsr = CurrentGameCounter.CurrentServiceRight.Flip(); return(new SetCounterHistoryItem(GameCounterFactory.Create(nsr), new TeamedValuePair <int>(SetCountA, npb), nsr)); } return(new SetCounterHistoryItem(null, new TeamedValuePair <int>(SetCountA, npb), CurrentServiceRight)); }
protected override SetCounterHistoryItem HandleIncrementB() { var npb = SetCountB + 1; if (CurrentGameCounter is MatchTieBreakFinalSetGameCounter || SatisfiesMatchEndingCondition(npb, SetCountA)) { npb = -npb; } else { var newPoint = new TeamedValuePair <int>(SetCountA, npb); EnumTeams newServiceRight = CurrentGameCounter.CurrentServiceRight.Flip(); return(new SetCounterHistoryItem(SatisfiesTieBreakCondition(npb, SetCountA) ? new MatchTieBreakFinalSetGameCounter(new TieBrakingPointCounter(MatchTieBreakPointCount, MatchTieBreakPointLeastDifference, newServiceRight), newServiceRight) : GameCounterFactory.Create(newServiceRight), newPoint, newServiceRight)); } return(new SetCounterHistoryItem(null, new TeamedValuePair <int>(SetCountA, npb), CurrentServiceRight)); }