-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Description
- Flush Detection: The code correctly identifies a flush by checking if all five cards share the same suit.
- Faulty Assumption: It then calculates a unique key based on the ranks of the cards in the flush and attempts to find this key in the flush_lookup table. The assumption was that any hand identified as a flush would
have an entry in this special table. - The Bug: The flush_lookup table is sparse and only contains entries for straight flushes. When the hand was a flush but not a straight flush (e.g., A, K, 5, 3, 2 of Spades), the calculated key would not be found in flush_lookup, resulting in a KeyError.

Metadata
Metadata
Assignees
Labels
No labels