예제 #1
0
        public void ValidateDoubleStrike()
        {
            var firstStrike  = _frameBuilder.CreateStrike();
            var secondStrike = _frameBuilder.CreateStrike();
            var thirdFrame   = _frameBuilder.CreateFrame(5, 2);
            var fourthFrame  = _frameBuilder.CreateFrame(2, 1);

            firstStrike.SetNextFrame(secondStrike);
            secondStrike.SetNextFrame(thirdFrame);
            thirdFrame.SetNextFrame(fourthFrame);
            Assert.Equal(52, fourthFrame.CalculateScore());
        }
예제 #2
0
 private Frame BuildStrike()
 {
     return(_builder.CreateStrike());
 }