Exemple #1
0
        private void ScorePlayerAgainst(Player player, Player playerAgainst)
        {
            player.Scored();

            if (player.Score == Score.Advantage && playerAgainst.Score == Score.Advantage)
            {
                player.Score = Score.Forty;
                playerAgainst.Score = Score.Forty;
            }
            else if (player.Score == Score.Advantage && playerAgainst.Score < Score.Forty){
                player.Score = Score.Game;
            }
        }
Exemple #2
0
 public void With_new_Player_and_Scored_Score_Should_Fifteen()
 {
     var player = new Player();
     player.Scored();
     Assert.AreEqual(Score.Fifteen, player.Score);
 }
Exemple #3
0
 public void New_Player_Score_Should_Love()
 {
     var player = new Player();
     Assert.AreEqual(Score.Love,player.Score);
 }
Exemple #4
0
 public Game()
 {
     PlayerOne = new Player();
     PlayerTwo = new Player();
 }