Browse Source

Phermone when explo is an home_direction pheromone

Bastien Sevajol 9 years ago
parent
commit
2692673b71

+ 3 - 1
intelligine/sandbox/exploration/collections.py View File

1
 from intelligine.sandbox.exploration.ColonyConfiguration import ColonyConfiguration
1
 from intelligine.sandbox.exploration.ColonyConfiguration import ColonyConfiguration
2
 from intelligine.synergy.Colony import Colony
2
 from intelligine.synergy.Colony import Colony
3
+from intelligine.synergy.Rocks import Rocks
4
+from intelligine.sandbox.exploration.RocksConfiguration import RocksConfiguration
3
 
5
 
4
-collections = [Colony(ColonyConfiguration())]
6
+collections = [Colony(ColonyConfiguration()), Rocks(RocksConfiguration())]

+ 3 - 2
intelligine/synergy/event/pheromone/ApposeDirection.py View File

1
 from synergine.synergy.event.Action import Action
1
 from synergine.synergy.event.Action import Action
2
 from intelligine.synergy.event.pheromone.PheromoneEvent import PheromoneEvent
2
 from intelligine.synergy.event.pheromone.PheromoneEvent import PheromoneEvent
3
 from xyzworld.cst import POSITION
3
 from xyzworld.cst import POSITION
4
-from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_DIR_EXPLO, PHEROMON_POSITIONS, MOVE_MODE_EXPLO
4
+from intelligine.cst import PHEROMON_DIRECTION, PHEROMON_DIR_HOME, PHEROMON_POSITIONS, MOVE_MODE_EXPLO
5
 from xyzworld.geometry import get_degree_from_north
5
 from xyzworld.geometry import get_degree_from_north
6
 from intelligine.synergy.event.move.direction import get_direction_for_degrees, get_direction_opposite
6
 from intelligine.synergy.event.move.direction import get_direction_for_degrees, get_direction_opposite
7
 from intelligine.core.exceptions import SamePosition
7
 from intelligine.core.exceptions import SamePosition
58
 
58
 
59
     def _get_pheromone_direction_type(self, obj):
59
     def _get_pheromone_direction_type(self, obj):
60
         if obj.get_movement_mode() == MOVE_MODE_EXPLO:
60
         if obj.get_movement_mode() == MOVE_MODE_EXPLO:
61
-            return PHEROMON_DIR_EXPLO
61
+            return PHEROMON_DIR_HOME
62
+        raise NotImplementedError()