Browse Source

bug fix: randint want a start and an end

Bastien Sevajol 9 years ago
parent
commit
351c9c632f

+ 1 - 1
intelligine/simulation/object/brain/part/MoveBrainPart.py View File

37
 
37
 
38
     @classmethod
38
     @classmethod
39
     def _get_random_direction(cls, context, object_id):
39
     def _get_random_direction(cls, context, object_id):
40
-        return randint(directions_same_level)
40
+        return randint(directions_same_level[0], directions_same_level[-1])

+ 0 - 1
intelligine/simulation/pheromone/DirectionPheromone.py View File

10
     @staticmethod
10
     @staticmethod
11
     def appose(context, point, movement_molecules):
11
     def appose(context, point, movement_molecules):
12
         pheromone_type, distance_from = movement_molecules
12
         pheromone_type, distance_from = movement_molecules
13
-        # TODO: Ajouter l'age de la pheromone !
14
         context.pheromones().increment(point, [PHEROMON_DIRECTION, pheromone_type], distance=distance_from)
13
         context.pheromones().increment(point, [PHEROMON_DIRECTION, pheromone_type], distance=distance_from)
15
         context.metas.list.add(PHEROMON_POSITIONS, PHEROMON_POSITIONS, point, assert_not_in=False)
14
         context.metas.list.add(PHEROMON_POSITIONS, PHEROMON_POSITIONS, point, assert_not_in=False)
16
 
15
 

+ 2 - 0
intelligine/simulation/pheromone/Pheromone.py View File

1
+class Pheromone():
2
+    pass

+ 2 - 0
intelligine/simulation/pheromone/PheromoneFlavour.py View File

1
+class PheromoneFlavour():
2
+    pass