Commits

Christoph Schindler committed 98d7cfd

pair 1

Comments (0)

Files changed (2)

BowlingWithAVengeance/bowling.py

             if is_strike(frame):
                 score += frame_score(next_frame)
                 if is_strike(next_frame):
-                    score = 25
+                    next_next_frame = frames[index+2]
+                    score += next_next_frame[0]
     return score

BowlingWithAVengeance/test.py

     assert_equal(bowling.get_score(((10,), (3,5))), 26)
     
 def test_get_score_4():
-    assert_equal(bowling.get_score(((10,), (10,), (5,4))), 25+19+9)
+    assert_equal(bowling.get_score(((10,), (10,), (5,4))), 25+19+9)
+    
+def test_get_score_5():
+    assert_equal(bowling.get_score(((10,), (10,), (2,4))), 22+16+6)