Exemplo n.º 1
0
        private TennisMatch SetUpTennisMatchScore()
        {
            var tennisMatch = new TennisMatch(playerOne.PlayerName, playerTwo.PlayerName, setsToWin);


            this.SetUpMatchScores(tennisMatch);
            this.SetUpSetScores(tennisMatch);
            this.SetUpGameScores(tennisMatch);

            return(tennisMatch);
        }
Exemplo n.º 2
0
        private void SetUpGameScores(TennisMatch tennisMatch)
        {
            for (int i = 0; i < playerOne.CurrentGameScore; i++)
            {
                tennisMatch.PlayerOneScored();
            }

            for (int i = 0; i < playerTwo.CurrentGameScore; i++)
            {
                tennisMatch.PlayerTwoScored();
            }
        }