Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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?

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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