Mercurial > rinkhals
comparison gamelib/equipment.py @ 423:97dd557504a2
Override make methods for simplifiable objects.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 15:39:49 +0000 |
parents | ab4fc3fe0f96 |
children | 42777630956a |
comparison
equal
deleted
inserted
replaced
422:ab4fc3fe0f96 | 423:97dd557504a2 |
---|---|
21 | 21 |
22 def __init__(self): | 22 def __init__(self): |
23 self._buy_price = self.BUY_PRICE | 23 self._buy_price = self.BUY_PRICE |
24 self._sell_price = self.SELL_PRICE | 24 self._sell_price = self.SELL_PRICE |
25 self._name = self.NAME | 25 self._name = self.NAME |
26 | |
27 def make(cls): | |
28 """Override default Simplifiable object creation.""" | |
29 return cls() | |
30 make = classmethod(make) | |
26 | 31 |
27 def buy_price(self): | 32 def buy_price(self): |
28 return self._buy_price | 33 return self._buy_price |
29 | 34 |
30 def sell_price(self): | 35 def sell_price(self): |