Exemple #1
0
        public Side Play()
        {
            theSet = new Set();
            gameScores = new List<GameScore>();
            gameScores.Add(new GameScore() { Score = theSet.PrintScore() });
            SetInitialServingSide();

            while(theSet.State != SetState.SetWonBySideOne && theSet.State != SetState.SetWonBySideTwo)
            {
                var gameWinner = playGame.Play();
                theSet.WinGame(s => gameWinner);
                ToggleServingSide();

                gameScores.Add(new GameScore() { Score = theSet.PrintScore(), PointScores = playGame.GetPointScores() });
            }

            if (theSet.State == SetState.SetWonBySideOne)
            {
                return Side.One;
            }
            else
            {
                return Side.Two;
            }
        }
Exemple #2
0
 public void Setup()
 {
     target = new Set();
 }
Exemple #3
0
 public void TearDown()
 {
     target = null;
 }