Skip to content

get_dealable_cards() is incorrectly listing mucked cards in certain cases (N>2 players in NL Texas Hold'em, + maybe other variants) #28

@Drazcmd

Description

@Drazcmd

E.g. say I have a 4 player NLHE game where one or two players have folded (and therefore mucked their hand). It appears that get_dealable_cards() will incorrectly include their cards as dealable when called.

The good news is:

  • the bug is trivial to work around since .mucked_cards, .burn_cards, .board_cards, and .hole_cards are all getting updated correctly. Meaning as a workaround, users can trivially write a helper function that checks for this situation and then filters out the mucked cards
  • I believe the internal checks here are all still working, i.e. before I had myself written+used such a helper function, pokerkit would correctly log a warning message any time I dealt one of these mucked cards

Note that:

  • this definitely happens in no-limit Texas Hold'dem with 4 players
  • I suspect it happens with other numbers of players > 2 and in the other game variants, but haven't had time to double check
  • I don't have a good code sample demonstrating this on hand atm, but I believe it should be pretty trivial to replicate. (If not lmk here and I can go put one together)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions