public void ShallPlayerWinTheGameWhenSheWinsTheBallAtFourtyAndOtherPlayerHasLessThanFourty() { var playerA = new Player(); var playerB = new Player(); var scorecard = new Scorecard(playerA, playerB); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerB); Assert.AreEqual("Player B wins", scorecard.GetCurrentGamePoints()); }
public void ShallGamePointBeLoveFifteen() { var playerA = new Player(); var playerB = new Player(); var scorecard = new Scorecard(playerA, playerB); scorecard.AwardPointToPlayer(playerB); Assert.AreEqual("Love - Fifteen", scorecard.GetCurrentGamePoints()); }
public void ShallPlayersReturnToDeuceIfOnePlayerLoosesAdvantage() { var playerA = new Player(); var playerB = new Player(); var scorecard = new Scorecard(playerA, playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); Assert.AreEqual("Deuce", scorecard.GetCurrentGamePoints()); }
public void ShallPlayerHaveAdvantageWhenSheWinsTheBallAtFourtyAndOtherPlayerHasFourty() { var playerA = new Player(); var playerB = new Player(); var scorecard = new Scorecard(playerA, playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerB); Assert.AreEqual("Advantage Player B", scorecard.GetCurrentGamePoints()); }
public void BothPlayersAreAtDeuceWhenTheyHaveFourtyPoints() { var playerA = new Player(); var playerB = new Player(); var scorecard = new Scorecard(playerA, playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); scorecard.AwardPointToPlayer(playerA); scorecard.AwardPointToPlayer(playerB); Assert.AreEqual("Deuce", scorecard.GetCurrentGamePoints()); }