Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
The instructions still seem unclear to me: For example, it says
Testing [8, 'A'] and J; Expecting: ['stay', 19]
. But if I can choose what an Ace is, whether soft (1) or hard (11), I may opt for soft in this case. My hand is 8+1=9. Hitting Jack brings me to 19. There's nothing wrong with that.Moreover, what's supposed to happen if the hand is
[9,'A']
and the next card isA
. Seems obvious to me that I should choose a soft Ace, having 9+1 in my hand, and then hit next card (Ace 11), totalling 21.The idea is: at any point where you are adding up the total value of your current hand of cards, it is up to you to decide whether or not it is more mathematically advantageous to count an
ace
as1
or11
.From the description:
not a kata issue
How do you know if an Ace is 1 or 11. You didn't tell us which situation causes 1 and which situation causes 11.
.
btw what should the function called!
tie
is almost never tested in random tests.There should be sample and fixed tests on cases for removing invalid names
Random tests do not have sufficient coverage such that this solution passes from time to time
Description does not mention about the criteria in deciding who is the winner ! (sum of all scores or side-by-side comparison or highest score or etc....)
Also the rules for scoring on
4 points
are vague, it should be4 points for each yard passing
This comment is hidden because it contains spoiler information about the solution
Retired.
Beautifull
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/63 .
Please join the discussion and share your opinion so duplicate kata could be identified, and then retired.
It's an easy one, but a good one. Thank you! :)
Loading more items...