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,4 +37,4 @@ class MoveBrainPart(BrainPart):
37 37
 
38 38
     @classmethod
39 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,7 +10,6 @@ class DirectionPheromone():
10 10
     @staticmethod
11 11
     def appose(context, point, movement_molecules):
12 12
         pheromone_type, distance_from = movement_molecules
13
-        # TODO: Ajouter l'age de la pheromone !
14 13
         context.pheromones().increment(point, [PHEROMON_DIRECTION, pheromone_type], distance=distance_from)
15 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

@@ -0,0 +1,2 @@
1
+class Pheromone():
2
+    pass

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

@@ -0,0 +1,2 @@
1
+class PheromoneFlavour():
2
+    pass