Skip to content

Commit

Permalink
Add unicode support to Card.new
Browse files Browse the repository at this point in the history
Chazzz authored Feb 10, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
weihanglo Weihang Lo
1 parent 01cb5f2 commit 2d5ce1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions treys/card.py
Original file line number Diff line number Diff line change
@@ -39,6 +39,10 @@ class Card:
'h': 2, # hearts
'd': 4, # diamonds
'c': 8, # clubs
'\u2660': 1, # spades (unicode)
'\u2764': 2, # hearts (unicode)
'\u2666': 4, # diamonds (unicode)
'\u2663': 8, # clubs (unicode)
}
INT_SUIT_TO_CHAR_SUIT: str = 'xshxdxxxc'

0 comments on commit 2d5ce1f

Please sign in to comment.