Exemplo n.º 1
0
 public GameOf300()
 {
     //Initialize the Game
     this._random = new Random();
     this._dart = new Dart(_random);
     this._player1 = new Player();
     this._player2 = new Player();
 }
Exemplo n.º 2
0
 private void throwDarts(Player player)
 {
     //Each player gets to throw three darts
     int turnScore = 0;
     for (int i = 1; i <= 3; i++)
     {
         this._dart.ThrowDart();
         turnScore += Score.CalculateDartScore(this._dart);
     }
     player.CurrentScore += turnScore;  //Adjust the current player's score
 }