Пример #1
0
        public void LastFrameShouldSimplyAddThreeBallsAsScore()
        {
            //given
            var lastFrame = new LastFrame(1, 2, 3);

            //when
            var score = lastFrame.Score;

            //then
            Assert.AreEqual(6, score);
        }
Пример #2
0
 private static Frame CreateFrame(int firstBall, int secondBall, int thirdBall)
 {
     Frame frame = null;
     if (thirdBall != -1)
     {
         frame = new LastFrame(firstBall, secondBall, thirdBall);
     }
     else
     {
         frame = new Frame(firstBall, secondBall);
     }
     return frame;
 }
Пример #3
0
        private static Frame CreateFrame(int firstBall, int secondBall, int thirdBall)
        {
            Frame frame = null;

            if (thirdBall != -1)
            {
                frame = new LastFrame(firstBall, secondBall, thirdBall);
            }
            else
            {
                frame = new Frame(firstBall, secondBall);
            }
            return(frame);
        }