|
@@ -9,7 +9,7 @@ ppath.insert(1,getcwd()+'/modules')
|
9
|
9
|
from intelligine.tests.simulation.molecule.Base import Base
|
10
|
10
|
from intelligine.simulation.molecule.DirectionMolecule import DirectionMolecule
|
11
|
11
|
from intelligine.core.Context import Context
|
12
|
|
-from intelligine.cst import MOLECULES_DIRECTION, PHEROMON_DIR_EXPLO
|
|
12
|
+from intelligine.cst import MOLECULES_DIRECTION, PHEROMON_DIR_EXPLO, PHEROMON_DIR_NONE
|
13
|
13
|
from intelligine.synergy.event.move.direction import NORTH, NORTH_EST, EST, SOUTH_EST, SOUTH, SOUTH_WEST, WEST, \
|
14
|
14
|
NORTH_WEST, CENTER
|
15
|
15
|
from intelligine.synergy.event.move.direction import get_position_with_direction_decal as _p
|
|
@@ -126,7 +126,7 @@ class TestDirection(Base):
|
126
|
126
|
_p(CENTER): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (10, 1)}},
|
127
|
127
|
_p(NORTH_WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (9, 1)}},
|
128
|
128
|
_p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (12, 1)}},
|
129
|
|
- _p(SOUTH): {MOLECULES_DIRECTION: {PHEROMON_DIR_HOME: (8, 1)}}
|
|
129
|
+ _p(SOUTH): {MOLECULES_DIRECTION: {PHEROMON_DIR_NONE: (8, 1)}}
|
130
|
130
|
},
|
131
|
131
|
}
|
132
|
132
|
|
|
@@ -148,7 +148,7 @@ class TestDirection(Base):
|
148
|
148
|
_p(CENTER): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (10, 2)}},
|
149
|
149
|
_p(NORTH_WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (9, 2)}},
|
150
|
150
|
_p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (8, 1)}},
|
151
|
|
- _p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_HOME: (5, 10)}} # an other molecule type
|
|
151
|
+ _p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_NONE: (5, 10)}} # an other molecule type
|
152
|
152
|
}
|
153
|
153
|
}
|
154
|
154
|
|
|
@@ -162,7 +162,7 @@ class TestDirection(Base):
|
162
|
162
|
},
|
163
|
163
|
NORTH: {
|
164
|
164
|
_p(NORTH): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (9, 2)}},
|
165
|
|
- _p(NORTH_WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_HOME: (9, 500)}} # An other molecule type
|
|
165
|
+ _p(NORTH_WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_NONE: (9, 500)}} # An other molecule type
|
166
|
166
|
}
|
167
|
167
|
}
|
168
|
168
|
|
|
@@ -178,7 +178,7 @@ class TestDirection(Base):
|
178
|
178
|
},
|
179
|
179
|
NORTH: {
|
180
|
180
|
_p(NORTH): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (9, 5)}},
|
181
|
|
- _p(WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_HOME: (9, 500)}}, # An other molecule_type
|
|
181
|
+ _p(WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_NONE: (9, 500)}}, # An other molecule_type
|
182
|
182
|
_p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (9, 4)}},
|
183
|
183
|
_p(NORTH_WEST): {MOLECULES_DIRECTION: {PHEROMON_DIR_EXPLO: (9, 4)}}
|
184
|
184
|
}
|
|
@@ -197,7 +197,7 @@ class TestDirection(Base):
|
197
|
197
|
# Wrong molecule type
|
198
|
198
|
try: # WTF ?
|
199
|
199
|
self.assertRaises(NoMolecule, self._test_direction_for_points({
|
200
|
|
- _p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_HOME: (9, 5)}}
|
|
200
|
+ _p(SOUTH_EST): {MOLECULES_DIRECTION: {PHEROMON_DIR_NONE: (9, 5)}}
|
201
|
201
|
}, -1))
|
202
|
202
|
except NoMolecule:
|
203
|
203
|
self.assertTrue(True)
|