public void FrameWithSpareIsSpare() { var frame = new Frame(); frame.AddThrow(4); frame.AddThrow(6); Assert.IsTrue(frame.IsSpare()); }
private int CalculateScore(Frame frame, int currentFrameNumber) { int score = frame.ScoreInFrame(); if (frame.IsSpare()) { score += CalculateSpareScore(currentFrameNumber); } else if (frame.IsStrike()) { score += CalculateStrikeScore(currentFrameNumber); } return score; }