Ejemplo n.º 1
0
 def loseEnergy(self):
     '''Decreases the critter's energy based on its metabolic rate, returns the amount of energy lost, and updates whether or not it is hungry.'''
     #Superclass method!
     Organism.loseEnergy(self)
     self.checkHunger()
     self.updateSmell()
Ejemplo n.º 2
0
 def loseEnergy(self):
     '''Decreases the fruit's energy by its decay rate, returns the amount of energy lost in case the World needs to refer to it.'''
     return Organism.loseEnergy(self)
     self.updateEnergy()