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; } }
public void Setup() { target = new Set(); }
public void TearDown() { target = null; }