When comparing single cards, it can be helpful to compare the hashed values of two cards to each other.
For instance, if I want to compare the A♠ to the A♣, the A♠ should hash to the greater value.
This follows the usual poker suit hierarchy:
Spades
Hearts
Diamonds
Clubs
Currently, the code in cards.py makes clubs hash to a higher value than spades (ranks being equal).
|
CHAR_SUIT_TO_INT_SUIT = { |
Comparisons between ranks work nicely, but comparison within ranks is not in accordance with the conventional suit hierarchy.

Would there be any side-effects with full-hand evaluation by reversing the current ordering of suits?
When comparing single cards, it can be helpful to compare the hashed values of two cards to each other.
For instance, if I want to compare the A♠ to the A♣, the A♠ should hash to the greater value.
This follows the usual poker suit hierarchy:
Spades
Hearts
Diamonds
Clubs
Currently, the code in
cards.pymakes clubs hash to a higher value than spades (ranks being equal).treys/treys/card.py
Line 35 in 70b481c
Comparisons between ranks work nicely, but comparison within ranks is not in accordance with the conventional suit hierarchy.
Would there be any side-effects with full-hand evaluation by reversing the current ordering of suits?