Define a color for cards

This commit is contained in:
nemunaire 2020-03-12 20:05:54 +01:00
parent 1abb0e0755
commit 9b7cdcef10

View File

@ -12,58 +12,76 @@ class Card():
self.score = score
def __repr__(self):
return type(self).__name__ + "(%d)"%self.score
return "\033[%dm%s\033[1m(%d)\033[0m"%(self.color, type(self).__name__, self.score)
class Chasseresse(Card):
color = 91
def __init__(self, score):
Card.__init__(self, score)
class DragonCorail(Card):
color = 92
def __init__(self, score):
Card.__init__(self, score)
class Pearl(Card):
color = 93
def __init__(self, score):
Card.__init__(self, score)
class Witch(Card):
color = 94
def __init__(self, score):
Card.__init__(self, score)
class DragonPetrified(Card):
color = 95
def __init__(self, score):
Card.__init__(self, score)
class Golem(Card):
color = 91
def __init__(self, score):
Card.__init__(self, score)
class Guardian(Card):
color = 92
def __init__(self, score):
Card.__init__(self, score)
class Horser(Card):
color = 93
def __init__(self, score):
Card.__init__(self, score)
class City(Card):
color = 94
def __init__(self):
Card.__init__(self, 0)