Beta
Bullseye!
Loading description...
Games
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Needs random tests.
It's not a good idea to quote crucial kata information from (non-reputable) external sites. What if the site goes down or something?
(There isn't that much information about what is a
bust
anyway, so no reason to just put it in the kata description)This comment has been hidden.
Well, if you haven't play any darts game yet, you should see the table first:
As you can see, there are areas for every number from 1 to 20(x). If you land your dart in thoose areas you'll get that many points('x'). The trick is, that if you land it in the outer narrow area on the table, you get double the points ('dx'), and the inner narrow area triples your points('tx'). The innermost two circular areas, are the bull. The green one in the middle gives you 25 points('25'), and the red (the bull's eye) gives 50('d25'). If you do not hit the table you miss, so get 0('0') points to decrease with.
Every turn of yours, you throw 3 arrows, decreasing your points with the amounts thoose yield, following the rules I linked earlier.
As far my poor english allows it, the uppercase "always valid" should emphasise, that the input my tests provide will be strings representing throwable scores, so you won't have to test them, just work with them. So yes 'd19' and '1' are good. I hope this helps you.
And please if you have a chance, throw a few IRL, it's fun!
Pretty much clear ! Thank you for the explanation (and the kata of course !)
Good idea for a Kata!
One issue: Your setup code does not match the expected code: it has
Games
, notGame
.Ugh! Sorry for that! It surely was irritating... I did change it to Game.
Thanks OverZealous!