ソースを参照

Phermone when explo is an home_direction pheromone

Bastien Sevajol 9 年 前
コミット
2692673b71
共有2 個のファイルを変更した6 個の追加3 個の削除を含む
  1. 3 1
      intelligine/sandbox/exploration/collections.py
  2. 3 2
      intelligine/synergy/event/pheromone/ApposeDirection.py

+ 3 - 1
intelligine/sandbox/exploration/collections.py ファイルの表示

@@ -1,4 +1,6 @@
1 1
 from intelligine.sandbox.exploration.ColonyConfiguration import ColonyConfiguration
2 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 ファイルの表示

@@ -1,7 +1,7 @@
1 1
 from synergine.synergy.event.Action import Action
2 2
 from intelligine.synergy.event.pheromone.PheromoneEvent import PheromoneEvent
3 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 5
 from xyzworld.geometry import get_degree_from_north
6 6
 from intelligine.synergy.event.move.direction import get_direction_for_degrees, get_direction_opposite
7 7
 from intelligine.core.exceptions import SamePosition
@@ -58,4 +58,5 @@ class ApposeDirection(Action):
58 58
 
59 59
     def _get_pheromone_direction_type(self, obj):
60 60
         if obj.get_movement_mode() == MOVE_MODE_EXPLO:
61
-            return PHEROMON_DIR_EXPLO
61
+            return PHEROMON_DIR_HOME
62
+        raise NotImplementedError()