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.
It isn't sequential. The values of the cards are T=10, J=11, Q=12, K=13.
So T, Q, K is not sequential.
They aren't. J♦ Q♦ K♦ or T♦ J♦ Q♦ or T♦ J♦ Q♦ K♦ would be. You're missing a Jack in both.
K♦ K♣ K♥ is a meld. Cards in a meld score zero points, so it reduces the hand score.
Either of the Queens Q♦ or Q♥.
lol, was a long time ago...
The description was incorrect in this case. Not to worry the Kata is all good as it is. I've got no problem with aces being high or low.
In Rummy aces are always low, so J♥ Q♥ K♥ A♥ is not a valid run. I'm not fussed either way to be honest, it's not strictly correct, should still be a fun Kata.
Wonderful job, thanks so much for all this. Looking good.
In this Kata there should be no point were a card receives more than one card, ie will never exceed eight cards. Nor will a player have to discard more then one, so will not drop below seven cards. If either of these happen there is a bug, as far as I know there is not one, in this area anyway.
It's likely going to be a while until I have time to look at this. Will let you know when I do. I'll likely opt for updating the description to make it clearer when I do.
I'll have to check through the tests again too though.
I haven't found the exact place where this happens. I'll take another look later, got to start work.
get_score()
should theoretically work with any number of cards, it shouldn't care when it is called. It should return the score of whatever is in the hand at the time. That said it should only need to be able to score a hand of seven cards in these tests.The same is true of
add_card()
anddiscard()
they should do the samething whenever they are called, callingadd_card()
repeatedly would keep adding cards to the hand,discard()
should keep choosing the lowest discard regardless of the number of cards in the hand. Again shouldn't be needed to pass the tests.That's just the way I like to write stuff.
Ah I see, well that's completely wrong if that's the case. I'll take a look.
Looks like you've figured this out, but in case others come across the issue.
You begin with seven cards, the script calls the add method which will give you another card. You now have eight cards in your hand. You must return the discarded card in from the discard method, leaving you with seven cards again.
This comment is hidden because it contains spoiler information about the solution
Great, cool. Closer now than ever then. Thanks for letting me know and all the work you put in to polishing it up.
Let's hope someone is up to the challenge soon!
Are you able to approve Katas? It'd be great if this could get a ranked and moved out of beta.
If there's anything else I can do, please let me know.
Loading more items...