compress.py: add method for colored output
This commit is contained in:
parent
c381a4c129
commit
0851f83e12
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ class DeckCard():
|
||||||
# should be injective enough, we never use cards with ranks differing by 1000
|
# should be injective enough, we never use cards with ranks differing by 1000
|
||||||
return 1000 * self.suitIndex + self.rank
|
return 1000 * self.suitIndex + self.rank
|
||||||
|
|
||||||
|
def colorize(self):
|
||||||
|
color = ["green", "blue", "magenta", "yellow", "white", "cyan"][self.suitIndex]
|
||||||
|
return colored(str(self), color)
|
||||||
|
|
||||||
class ActionType(Enum):
|
class ActionType(Enum):
|
||||||
Play = 0
|
Play = 0
|
||||||
|
|
Loading…
Reference in a new issue