public void LastFrameShouldSimplyAddAllThreeBallsUp() { //given var lastFrame = new LastFrame(1, 2, 3); //when var score = lastFrame.Score; //then Assert.AreEqual(6, score); }
public void FrameShouldIncludeNextTwoBallsAsBonusWhenNextToStrikeIsLastFrame() { //given var frame = new Frame(10, 0); var frame2 = new LastFrame(10, 3, 4); frame.Next = frame2; //when var score = frame.Score; //then Assert.AreEqual(23, score); }
private Frame CreateFrame(int firstBall, int secondBall, int thirdBall) { Frame frame; if (thirdBall == -1) { frame = new Frame(firstBall, secondBall); } else { CheckLastPosition(); frame = new LastFrame(firstBall, secondBall, thirdBall); } return frame; }
private Frame CreateFrame(int firstBall, int secondBall, int thirdBall) { Frame frame; if (thirdBall == -1) { frame = new Frame(firstBall, secondBall); } else { CheckLastPosition(); frame = new LastFrame(firstBall, secondBall, thirdBall); } return(frame); }
public void ThridBallShouldNotBeBiggerThan10() { var lastFrame = new LastFrame(1, 2, 13); var score = lastFrame.Score; }