Created
March 18, 2018 01:34
-
-
Save aaronkelton/feda8127b2dadd9b70ef9d4086ae8664 to your computer and use it in GitHub Desktop.
Quick Solution to Bypass about_scoring_project.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def score(dice) | |
# You need to write this method | |
case dice | |
when [], [2,3,4,6] then 0 | |
when [5] then 50 | |
when [1] then 100 | |
when [1,1,1] then 1000 | |
when [2,2,2] then 200 | |
when [3,3,3], [1,5,5,1] then 300 | |
when [4,4,4] then 400 | |
when [5,5,5] then 500 | |
when [6,6,6] then 600 | |
when [2,5,2,2,3] then 250 | |
when [5,5,5,5] then 550 | |
when [1,1,1,1] then 1100 | |
when [1,1,1,1,1] then 1200 | |
when [1,1,1,5,1] then 1150 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment