1. Python User Group Austria
  2. Untitled project
  3. PythonDojo

Commits

Christoph Schindler  committed 98d7cfd

pair 1

  • Participants
  • Parent commits 50fc441
  • Branches dojo-2012-10-21

Comments (0)

Files changed (2)

File BowlingWithAVengeance/bowling.py

View file
  • Ignore whitespace
             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

File BowlingWithAVengeance/test.py

View file
  • Ignore whitespace
     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)