Skip to content

[Bowling] Add edge case with fill balls in a last-frame strike (Re-applies #418) #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion exercises/bowling/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"score": {
"description": [
"Returns the final score of a bowling game"
"returns the final score of a bowling game"
],
"cases": [{
"description": "should be able to score a game with all zeros",
Expand Down Expand Up @@ -89,6 +89,14 @@
"description": "two bonus rolls after a strike in the last frame can not score more than 10 points",
"rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 6],
"expected": -1
}, {
"description": "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike",
"rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6],
"expected": 26
}, {
"description": "the second bonus rolls after a strike in the last frame can not be a strike if the first one is not a strike",
"rolls": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6, 10],
"expected": -1
}, {
"description": "an unstarted game can not be scored",
"rolls": [],
Expand Down