6 kyu
The Dice Game
93saudiGuy
Loading description...
Algorithms
Games
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.
Проблема! Как можно на основании такого счета [(5, 1), (2, 6), (1, 6), (6, 4), (3, 4), (2, 5), (6, 1), (3, 2), (4, 1)] определить победителя 'p4'? Если после первого раунда: 5+1=6, 2+6=8, 1+6=7, 6+4=10 выбывает 'p1' с минимальным результатом: 5+1=6, то во втором раунде оставшиеся 3 игрока выкидывают одинаковый результат: 3+4=7, 2+5=7, 6+1=7.Ничья. По правилам игроки перебрасывают кубики, значит в общем счете должно быть зафиксировано еще как минимум 3 результата для определения победителя, а имеем только 2 результата: 3+2=5, 4+1=5. Как при таком счете определить победителя? Алгоритм который я создал прошел все тесты кроме этого. Кто-нибудь сможет мне объяснить как это понимать?
hard and fun to code, but this is above 5kuy, i'd say 4 kyu
Difficulty ranks cannot be changed, and it’s not a 4kyu kata, not even 5kyu.
I know it cannot be changed. I was sharing my feelings about the kata based on the fact that all 5kyu katas i've solved were easier than this and for sure 6kyu even easier.
Obviously that's my point of view and it's possible that i struggled with coming up with the algorithm this time.
Thanks for your thoughts
Don't use the 'suggestion' tag for this 'feeling'. :)
Understood :)
Quite a little bit tricky figuring out the right method and procedure to solve this kata.
I think this is way harder than 6 kyu, feels like a 4 kyu. Good kata, not as simple as it seems.
This comment has been hidden.
how does p4 win this dice_game([(1, 3), (2, 6), (6, 3), (5, 6), (2, 2), (5, 6), (5, 4), (1, 3), (5, 6)]), 'p4')
p4 has a value of 11 and player1 and player8 have the same value, and the tiebreaker doesnt work there ...
there are only four players..
I don't understand this part:
But in the example, there is the round 3 where p1 and p4 roll
(1, 5)
, which is a tie. Tie breaking rule says that their first roll should be checked, and for p1 it's(6, 2)
and for p4 it's(5, 4)
. But in the example, the tie not resolved and players proceed to round 4. Why?It was explained to me that the tie breaker should be read as "the first die of a current roll", but this is confusing: the players roll a pair of dice, and there is no first die nor a second die when you roll a pair of dice.
The "all players should go for another round of rolls" adds to the confusion, because, trying to find a way through the first confusing situation, it was not clear anymore if "all" means all participants, or just remaining, active players.
I agree with your remarks. I beg the author to clarify this or I believe it should be raised as un issue.
It should be clearer that in case of tie all players repeat the round, not only the players with the lowest score.
P.S. It would be more interesting if only the players with the lowest score repeat the roll until one of them gains the elimination.
Description should be language-agnostic (Removal of function name)
Missing useful assertion messages
Check if acceptable now..
.
The input seems very dangerous. What happens if scores are exhausted and no winner has been declared yet? Or will this never happen?
It will never happen. Random tests will keep adding dice until we have a winner.