public override IGameState PointAdded(Party party) { int newScore = Game.GetScore(party); int oppScore = Game.GetOpposingScore(party); if (ScoreHelper.IsAboveWithMargin(newScore, oppScore, 7, 2)) { return(new GameStateWon(Game, party)); } return(this); }
public override ISetState GameAdded(Party party) { int score = Set.GetScore(party); int opposingScore = Set.GetOpposingScore(party); if (ScoreHelper.IsAboveWithMargin(score, opposingScore, 6, 2)) { return(new SetStateWon(Set, party)); } return(this); }