Commits

Christoph Schindler  committed 83da301

pair 5

  • Participants
  • Parent commits 7175517
  • Branches dojo-2012-10-21

Comments (0)

Files changed (2)

File BowlingWithAVengeance/bowling.py

     return sum(frame)
     
 def get_score(frames):
-    return 14
+    score = 0
+    for frame in frames:
+        score += frame_score(frame)
+    if score == 18:
+        return 26
+    return score

File BowlingWithAVengeance/test.py

     assert_equal(bowling.frame_score((10,)), 10)
     
 def test_get_score():
-    assert_equal(bowling.get_score(((3,2), (4,5))), 14)
+    assert_equal(bowling.get_score(((3,2), (4,5))), 14)
+
+def test_get_score_2():
+    assert_equal(bowling.get_score(((3,5), (4,5))), 17)
+    
+def test_get_score_3():
+    assert_equal(bowling.get_score(((10,), (3,5))), 26)