Skip to content

bowling 1.0.0.2: drop unneeded rolls, edit a description #531

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
May 9, 2017
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion exercises/bowling/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: bowling
version: 0.9.0.1 # 2016-11-20
version: 1.0.0.2

dependencies:
- base
Expand Down
8 changes: 4 additions & 4 deletions exercises/bowling/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ cases = [ Case { description = "should be able to score a game with all zeros"
, expected = Right 300
}
, Case { description = "rolls can not score negative points"
, rolls = [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
, rolls = [-1]
, expected = Left $ InvalidRoll 0 (-1)
}
, Case { description = "a roll can not score more than 10 points"
, rolls = [11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
, rolls = [11]
, expected = Left $ InvalidRoll 0 11
}
, Case { description = "two rolls in a frame can not score more than 10 points"
, rolls = [5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
, rolls = [5, 6]
, expected = Left $ InvalidRoll 1 6
}
, Case { description = "bonus roll after a strike in the last frame can not score more than 10 points"
Expand Down Expand Up @@ -121,7 +121,7 @@ cases = [ Case { description = "should be able to score a game with all zeros"
, rolls = [0, 0]
, expected = Left IncompleteGame
}
, Case { description = "a game with more than ten frames can not be scored"
, Case { description = "cannot roll if game already has ten frames"
, rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
, expected = Left $ InvalidRoll 20 0
}
Expand Down