Mercurial > rinkhals
diff gamelib/gameboard.py @ 80:ad9d1bc7ef0c
Kill foxes that don't reach safety
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Tue, 01 Sep 2009 11:21:43 +0000 |
parents | 8241386a1651 |
children | 9bd2c22e1746 |
line wrap: on
line diff
--- a/gamelib/gameboard.py Tue Sep 01 11:20:14 2009 +0000 +++ b/gamelib/gameboard.py Tue Sep 01 11:21:43 2009 +0000 @@ -243,6 +243,13 @@ def clear_foxes(self): for fox in self.foxes: self.tv.sprites.remove(fox) + # Any foxes that didn't make it to the woods are automatically + # killed + if self.in_bounds(fox.pos) and self.tv.get(fox.pos.to_tuple()) \ + != self.WOODLAND: + self.killed_foxes += 1 + self.toolbar.update_fox_counter(self.killed_foxes) + self.add_cash(constants.SELL_PRICE_DEAD_FOX) self.foxes = [] # Remove all the foxes def move_foxes(self):