Commits

Christoph Schindler  committed 2dc931d

pair 3

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

Comments (0)

Files changed (2)

File BowlingWithAVengeance/bowling.py

 def parse_roll(roll):
     if roll == '/':
         return '/'
-    return STRIKE
+    return STRIKE
+    
+def frame_score(frame):
+    return sum(frame)

File BowlingWithAVengeance/test.py

     assert_equal(bowling.parse_roll("X"),bowling.STRIKE)
     
 def test_parse_spare():
-    assert_equal(bowling.parse_roll("/"),bowling.SPARE)
+    assert_equal(bowling.parse_roll("/"),bowling.SPARE)
+    
+def test_simple_frame():
+    assert_equal(bowling.frame_score((3,2)), 5)
+    
+def test_simple_frame_2():
+    assert_equal(bowling.frame_score((9,0)), 9)