Mercurial > rinkhals
changeset 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 | 9377ea6976e5 |
children | 9acf8e3d9596 |
files | gamelib/gameboard.py |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/gameboard.py Wed Sep 02 22:11:55 2009 +0000 +++ b/gamelib/gameboard.py Wed Sep 02 22:14:33 2009 +0000 @@ -350,6 +350,8 @@ def logging_forest(self, tile_pos): if self.tv.get(tile_pos) != self.WOODLAND: return + if self.cash < constants.LOGGING_PRICE: + return self.add_cash(-constants.LOGGING_PRICE) self.tv.set(tile_pos, self.GRASSLAND)