Skip to content

Commit 013768b

Browse files
committed
CardRank inherits from IntEnum instead of Enum, to fix type issues.
1 parent 27b6df4 commit 013768b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

71_Poker/python/cards/card.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Card primitives: Suits, Ranks, and the Card class."""
22

33
from dataclasses import dataclass
4-
from enum import Enum
4+
from enum import Enum, IntEnum
55

66

77
class CardSuit(Enum):
@@ -16,7 +16,7 @@ def __str__(self) -> str:
1616
return self.name.capitalize()
1717

1818

19-
class CardRank(Enum):
19+
class CardRank(IntEnum):
2020
"""Card ranks from Two (0) to Ace (12)."""
2121

2222
TWO = 0

0 commit comments

Comments
 (0)