diff 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
line wrap: on
line diff
--- a/gamelib/gameboard.py	Sat Nov 21 11:34:12 2009 +0000
+++ b/gamelib/gameboard.py	Sat Nov 21 12:07:01 2009 +0000
@@ -368,6 +368,10 @@
         self.reset_states()
         self.toolbar.update_fin_tool(self.day)
         self._cache_animal_positions()
+        self.spawn_foxes()
+        self.lay_eggs()
+        for chicken in self.chickens:
+            chicken.reload_weapon()
 
     def start_day(self):
         self.day, self.night = True, False
@@ -375,6 +379,9 @@
         self.reset_states()
         self.toolbar.update_fin_tool(self.day)
         self._pos_cache = { 'fox' : [], 'chicken' : []}
+        self.advance_day()
+        self.clear_foxes()
+        self.hatch_eggs()
 
     def in_bounds(self, pos):
         """Check if a position is within the game boundaries"""