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 didn't find any other bug.
    Thanks again.

  • Custom User Avatar

    Now that seems to be fixed, thanks.
    I'm still reviewing other test cases.

  • Custom User Avatar

    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)

  • Custom User Avatar

    that's a major spec update, all languages should be revisited .. who changed the spec after 1000's of submissions anyway

  • Custom User Avatar
  • 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

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Python fork:

    • Uses new test framework
    • Adds fixed test for low ace straight
    • Adds actual random tests
    • Fixes "cheater" hands with card duplicates
    • Replaces author solution (which would not pass the new random tests)
  • Custom User Avatar

    The same is happening to me in the C version. Not passing the tests because of that.

  • Custom User Avatar

    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.

  • 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

  • Loading more items...