Card multiplication! Useful? Who knows!

This commit is contained in:
Correl Roush 2010-06-17 11:02:05 -04:00
parent 93957b0ff7
commit 8a08b97c7b

5
mtg.py
View file

@ -141,6 +141,11 @@ class Card:
self.store()
def __repr__(self):
return 'Card: [{2}] {0}: {1} [{3}/{4}]'.format(self.name, ' '.join([a.capitalize() for a in self.attributes]), self.cost, self.power, self.toughness)
def __mul__(self, other):
result = []
for i in xrange(other):
result.append(copy.copy(self))
return result
def store(self):
self.__stored = copy.copy(self)
def restore(self):