From a5b6d9da58fc25b6e582f507de9b465927f0458f Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 09 Feb 2010 00:57:23 +0000 Subject: correccion en las edades de nacimiento de los conejos --- diff --git a/Animals.py b/Animals.py index b3a3a60..238cca1 100644 --- a/Animals.py +++ b/Animals.py @@ -155,7 +155,7 @@ class Rabbit(AbstractAnimal): self._world = world self.orden = 0 - self.edad = world.rabbit_data.madurezSexual + self.edad = 1 self.sexo = "F" if (random.random() > 0.5): self.sexo = "M" diff --git a/ecomundoactivity.py b/ecomundoactivity.py index 071936e..5f27847 100644 --- a/ecomundoactivity.py +++ b/ecomundoactivity.py @@ -94,12 +94,16 @@ def initAnimals(): y = int(random.random()*(World.CANT_TILES-1)) #print "Init Rabbit",x,y animal = Animals.Rabbit(x,y,world) + animal.edad = world.rabbit_data.madurezSexual + animal.ultimaAlimentacion = animal.edad world.animals.append(animal) for n in range(world.initialFoxs): x = int(random.random()*(World.CANT_TILES-1)) y = int(random.random()*(World.CANT_TILES-1)) #print "Init Fox",x,y animal = Animals.Fox(x,y,world) + animal.edad = world.fox_data.madurezSexual + animal.ultimaAlimentacion = animal.edad world.animals.append(animal) -- cgit v0.9.1