Mercurial > rinkhals
comparison gamelib/gameboard.py @ 135:149822fbebeb
Check that there is enough cash before logging.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Wed, 02 Sep 2009 22:14:33 +0000 |
parents | 4527e09dc620 |
children | 1d73de63bd71 |
comparison
equal
deleted
inserted
replaced
134:9377ea6976e5 | 135:149822fbebeb |
---|---|
347 self.add_cash(constants.SELL_PRICE_FENCE) | 347 self.add_cash(constants.SELL_PRICE_FENCE) |
348 self.tv.set(tile_pos, self.GRASSLAND) | 348 self.tv.set(tile_pos, self.GRASSLAND) |
349 | 349 |
350 def logging_forest(self, tile_pos): | 350 def logging_forest(self, tile_pos): |
351 if self.tv.get(tile_pos) != self.WOODLAND: | 351 if self.tv.get(tile_pos) != self.WOODLAND: |
352 return | |
353 if self.cash < constants.LOGGING_PRICE: | |
352 return | 354 return |
353 self.add_cash(-constants.LOGGING_PRICE) | 355 self.add_cash(-constants.LOGGING_PRICE) |
354 self.tv.set(tile_pos, self.GRASSLAND) | 356 self.tv.set(tile_pos, self.GRASSLAND) |
355 | 357 |
356 def buy_building(self, tile_pos, building_cls): | 358 def buy_building(self, tile_pos, building_cls): |