Mercurial > rinkhals
comparison gamelib/gameboard.py @ 413:bdc4757e0497
Add Sniper Rifle and give guns limited ammunition.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 12:07:01 +0000 |
parents | 02a6de5629d6 |
children | 9096c237928c |
comparison
equal
deleted
inserted
replaced
412:1e24eedbf40f | 413:bdc4757e0497 |
---|---|
366 self.day, self.night = False, True | 366 self.day, self.night = False, True |
367 self.tv.sun(False) | 367 self.tv.sun(False) |
368 self.reset_states() | 368 self.reset_states() |
369 self.toolbar.update_fin_tool(self.day) | 369 self.toolbar.update_fin_tool(self.day) |
370 self._cache_animal_positions() | 370 self._cache_animal_positions() |
371 self.spawn_foxes() | |
372 self.lay_eggs() | |
373 for chicken in self.chickens: | |
374 chicken.reload_weapon() | |
371 | 375 |
372 def start_day(self): | 376 def start_day(self): |
373 self.day, self.night = True, False | 377 self.day, self.night = True, False |
374 self.tv.sun(True) | 378 self.tv.sun(True) |
375 self.reset_states() | 379 self.reset_states() |
376 self.toolbar.update_fin_tool(self.day) | 380 self.toolbar.update_fin_tool(self.day) |
377 self._pos_cache = { 'fox' : [], 'chicken' : []} | 381 self._pos_cache = { 'fox' : [], 'chicken' : []} |
382 self.advance_day() | |
383 self.clear_foxes() | |
384 self.hatch_eggs() | |
378 | 385 |
379 def in_bounds(self, pos): | 386 def in_bounds(self, pos): |
380 """Check if a position is within the game boundaries""" | 387 """Check if a position is within the game boundaries""" |
381 if pos.x < 0 or pos.y < 0: | 388 if pos.x < 0 or pos.y < 0: |
382 return False | 389 return False |