comparison gamelib/animal.py @ 187:6854e706dcdf

Remove hatched eggs
author Neil Muller <drnlmuller@gmail.com>
date Fri, 04 Sep 2009 17:53:21 +0000
parents ff168162974e
children 9d31cfc3afde
comparison
equal deleted inserted replaced
186:f06010d34cd3 187:6854e706dcdf
130 self.egg = Egg(self.pos) 130 self.egg = Egg(self.pos)
131 131
132 def hatch(self): 132 def hatch(self):
133 """See if we have an egg to hatch""" 133 """See if we have an egg to hatch"""
134 if self.egg: 134 if self.egg:
135 return self.egg.hatch() 135 chick = self.egg.hatch()
136 if chick:
137 self.egg = None
138 return chick
136 return None 139 return None
137 140
138 def _find_killable_fox(self, weapon, gameboard): 141 def _find_killable_fox(self, weapon, gameboard):
139 """Choose a random fox within range of this weapon.""" 142 """Choose a random fox within range of this weapon."""
140 killable_foxes = [] 143 killable_foxes = []