Ejemplo n.º 1
0
 /// <summary>
 /// Reset game and clear score
 /// </summary>
 public void ResetGame()
 {
     _tenPinBowlingFrames    = new TenPinBowlingFrame[10];
     _tenPinBowlingFrames[0] = new TenPinBowlingNormalFrame();
     _currentFrame           = 0;
     _tenPinBowlingScore.ClearScore();
 }
Ejemplo n.º 2
0
        public TenPinBowlingGame(ITenPinBowlingScore tenPinBowlingScore)
        {
            _tenPinBowlingFrames    = new TenPinBowlingFrame[10];
            _tenPinBowlingFrames[0] = new TenPinBowlingNormalFrame();

            _tenPinBowlingScore = tenPinBowlingScore;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Setup the next frame in the game
 /// </summary>
 public void NextFrame()
 {
     if (!IsGameOver())
     {
         if (_currentFrame < 8)
         {
             _tenPinBowlingFrames[++_currentFrame] = new TenPinBowlingNormalFrame();
         }
         else
         {
             _tenPinBowlingFrames[++_currentFrame] = new TenPinBowlingLastFrame();
         }
     }
 }