5 kyu
Zonk game
295 of 1,195SagePtr
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.
Approved, thank you
In one of the tests I am failing it is giving 15151 as the code and expecting 1800 as a result, no matter how I look at the table I don't see how to get that result any insight? I am using python if that changes anything After exploring what my code does it submites what I beleive to be the correct answer 1100 but the test case says it submits Zonk while expecting 1800
I validated your solution, it fails [6, 6, 6, 6, 6] test. There is a small bug in your code, easy fixable.
I updated Python tests to be more informative about the input, try it now
Thank you, I was struggling to figure out why it was failing and was getting that as the output, was a simple bug which I feel like can be the most annoying to deal with.
Very interesting kata, congratulations.
Scala translation
C translation 🎲🎲🎲
LGTM, approved
Description formatting is broken.
.
I believe there is an error with the test cases for this kata. I belive this because when submitting it says that my code should return 2050, but is instead returning 450. This leads me to believe it's the submission cases not my code because the only combination of 6 dice that can equal 2050 is 1,1,1,1,5 and any 6th number that is not 1 or 5. If I put for example 1,1,1,1,5,6 expects to 2050 it passes. I've tested this with every possible 6th 1-6 digit that isn't 1 or 5, and it works for every one returning 2050. If you could look into this, or if you believe it's my code suggest a test case that should fail.
What are the parameters of the failed test? AFAIK every programming language here at CodeWars has some way to print something. What programming language are you using?
Insuffucient information, OP has left the building.
I fail every test with the result ...instead got: undefined"
The program works well (and is complete) in the terminal and returns with either the correct score or "Zonk". Any ideas?
Thanks!
Maybe you print result to terminal and don't return it?
The description should explicitly state that
X,X,Y,Y,Y,Y
is not three pair. I thought my solution falsely passed until I went back and tried fixing it."took into account" should read "taken into account"
Updated description. About three pairs it's stated in examples.
testcase for submission might've missed the following situation:
when score of
[x, x, x, y, y, y]
should beThree-of-kind 'x'
+Three-of-kind 'y'
.e.g. score of
[1, 1, 1, 6, 6, 6]
ought to be1000
for Three-of-kind '1' plus600
for Three-of-kind '6' =1000
+600
=1600
cause i've passed it (by clicking the 'submit') when i only counted the score of one of them (Three-of-kind 'x' and Three-of-kind 'y'), while failing my own test
or i might've misunderstood the rules...XD
Thank you, added this test case
Cool. Thank you for making this awesome kata!
Typo: "You task". It should say "Your task".
Fixed it, thank you
Not sure what "Each 1" and "Each 5" means..? Does it mean every 1 is worth 100 points? And every 5 is worth 50 points?
Also, I'm guessing that you cannot use a die more than once?
Yes, it's true. One die can be used only in one combination same time, so three fives will grant only 500 points, not 500 + 3 * 50. Changed description from "each" to "every"
Cool. You should probably put that a dice can only be used once somewhere, too. It's probably common sense, but people that haven't played these kinds of games before may not think about it.
Added this to description, I hope now it's more clear
Awesome. Thanks.
You've got a mistake in the description: it looks like single
5
's are worth150
points, but they are only worth50
points (in the table).Otherwise, this is a decent kata, with excellent tests. I enjoyed solving it.
Thank you, it was a typo, fixed it =)
Cool!