Skip to content

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

Merged
Insti merged 1 commit intoexercism:masterfrom
Insti:fix_bowling_conflicts
Oct 22, 2016
Merged

[Bowling] Add edge case with fill balls in a last-frame strike (Re-applies #418)#423
Insti merged 1 commit intoexercism:masterfrom
Insti:fix_bowling_conflicts

Conversation

@Insti
Copy link
Copy Markdown
Contributor

@Insti Insti commented Oct 22, 2016

Fixes the mess I made of @IanWhitney's PR: #418

  • Add edge case with fill balls in a last-frame strike

The previous test does not quite capture the behavior.

If the first fill fill is a non-strikes, then the total fill-ball score
must be less than 10.

But, if the first fill ball is a strike, then the total fill-ball score
must be less than 20. Because that first fill-ball strike resets the
pins.

I had what I thought was a working implementation but it totally missed
the 2nd case. Adding a test to cover that case.

  • Add edge case test for final-strike fill balls

This test checks that the fill balls validate correctly if the 2nd ball
is a strike.

…ism#418)

* Add edge case with fill balls in a last-frame strike

The previous test does not quite capture the behavior.

If the first fill fill is a non-strikes, then the total fill-ball score
must be less than 10.

But, if the first fill ball is a strike, then the total fill-ball score
must be less than 20. Because that first fill-ball strike resets the
pins.

I had what I thought was a working implementation but it totally missed
the 2nd case. Adding a test to cover that case.

* Add edge case test for final-strike fill balls

This test checks that the fill balls validate correctly if the 2nd ball
is a strike.
@Insti Insti changed the title [Bowling] Add edge case with fill balls in a last-frame strike (#418) [Bowling] Add edge case with fill balls in a last-frame strike (Re-applies #418) Oct 22, 2016
@Insti Insti merged commit 7b0949e into exercism:master Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants