changeset 187:6854e706dcdf

Remove hatched eggs
author Neil Muller <drnlmuller@gmail.com>
date Fri, 04 Sep 2009 17:53:21 +0000
parents f06010d34cd3
children 1281196ccafd
files gamelib/animal.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/animal.py	Fri Sep 04 17:49:37 2009 +0000
+++ b/gamelib/animal.py	Fri Sep 04 17:53:21 2009 +0000
@@ -132,7 +132,10 @@
     def hatch(self):
         """See if we have an egg to hatch"""
         if self.egg:
-            return self.egg.hatch()
+            chick = self.egg.hatch()
+            if chick:
+                self.egg = None
+            return chick
         return None
 
     def _find_killable_fox(self, weapon, gameboard):