Skip to content

Commit

Permalink
test all strikes
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 25, 2017
1 parent 053432b commit 2f1152c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,23 @@ and then checkout the next tag. Here is the list of tags:

v0.1 - Initial checkin - all gutter balls

v0.2
v0.2 - all static rolls 1

v0.3
v0.3 - all static rolls 2

v0.4
v0.4 - all static rolls 3

v0.5
v0.5 - single spare roll

v0.6
v0.6 - 9 spare rolls

v1.0 - Game rules fully implemented
v0.7 - all spare rolls

v0.8 - one strike

v0.9 - nine strikes

v1.0 - all strikes

With these tests in place you don't even need to know how to score bowling. In case you're
interested, here are the rules and an example:
Expand Down
9 changes: 9 additions & 0 deletions game_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,13 @@ def test_nine_strikes
assert_equal(240, @game.score, "9 strikes, 2 gutter balls wrong")
end

def test_all_strikes
(1..10).each do
@game.add_roll(10)
end
@game.add_roll(10)
@game.add_roll(10)

assert_equal(300, @game.score, "9 strikes, 2 gutter balls wrong")
end
end

0 comments on commit 2f1152c

Please sign in to comment.