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 description explicitly mentioned "Texas Hold'em", where each player is dealt two cards face-down, and everyone at the table shares five cards face-up in the centre of the table. The players then make use of the best of those seven cards to create a hand.
So, in this gameplay, potentially the best poker hand could be made by a player utilizing all five table cards to make their best hand. This could potentially take place for multiple players.
Ultimately, any amount of shared cards between the players in a five-card input situation. However, some presentations wouldn't sensibly match the situation in the previous paragraph, depending on what those cards were, and how each player correctly chose their best hannd.
So, the simple answer is to leave the kata alone. If we all want to get really explicit on the card choices made by the players, it's starting to look like a massive headache in writing code that would perfectly follow the logic of the game. Sounds like a whole new kata concept is hiding there.
The original issue is about duplicate cards in one hand. Your issue is about cards repeating in different hands. Whether it is a problem or not can be argued and depends on interpretation of the task: in some variants of poker, cards can be shared between players (like texas holdem and variants), or maybe the task is about unrelated poker hands, and not about hands from the same deal?
Seems not fixed to me. I was given the test:
"JC 6H JS JD JH", "JC 7H JS JD JH"
Both hands contain 4 Jacks. For this to be possible, there would have to be at least two decks of cards in use. To be fair, the description does not specify whether a single deck of cards is used, but I think most people would assume that's the case.
I didn't find any other bug.
Thanks again.
Now that seems to be fixed, thanks.
I'm still reviewing other test cases.
From reading over the discourse, it seems like some languages used this spec from the beginning. And in other langs (like python) the tests simply never tested that case.
In general a lot of solutions would be invalidated simply by stronger random tests, even if spec isnt changed at all. So IMO its not a bad time to fix the spec too (ie. align it to the current description)
that's a major spec update, all languages should be revisited .. who changed the spec after 1000's of submissions anyway
deleted
I fixed the hands with duplicated KHs. I did not find any other hand with duplicated cards, but let me know in case I missed any.
Please try again and check if duplicate cards are still a problem.
I'm not passing the kata because of this issue. Apparently I cannot contribute further before passing it. And I'm not going to code a wrong solution in order to pass the wrong tests.
I've just noticed that apparently the description used to say that low aces are NOT valid, however it now states that they are valid, which is also what this fork assumes. I also think they should definitely be considered valid, since that is the rules.
Python fork:
The same is happening to me in the C version. Not passing the tests because of that.
In the C version, random tests produce invalid inputs like "3C KH 5D 5S KH".
The King of Hearts is twice in the hand, so that hand is invalid.
Not a kata issue. Unless you pin-point which section of the problem is unclear and suggest rewording improvements, but that is at-most a suggestion
Loading more items...