Browse Source

remove move mode constants

Bastien Sevajol 9 years ago
parent
commit
4cf3365a10

+ 5 - 5
intelligine/cst.py View File

17
 MOLECULES = IncrementedNamedInt.get('intelligine.molecules')
17
 MOLECULES = IncrementedNamedInt.get('intelligine.molecules')
18
 
18
 
19
 # TODO: Renommer "move_mode" en "mode" ?
19
 # TODO: Renommer "move_mode" en "mode" ?
20
-MOVE_MODE = IncrementedNamedInt.get('intelligine.basebug.move.mode')
21
-MOVE_MODE_EXPLO = IncrementedNamedInt.get('intelligine.basebug.move.mode.explo')
22
-MOVE_MODE_GOHOME = IncrementedNamedInt.get('intelligine.basebug.move.mode.gohome')
23
-MOVE_MODE_NURSE = IncrementedNamedInt.get('intelligine.basebug.move.mode.nurse')
24
-MOVE_MODE_HOME = IncrementedNamedInt.get('intelligine.basebug.move.mode.home')
20
+MODE = IncrementedNamedInt.get('intelligine.basebug.move')
21
+MODE_EXPLO = IncrementedNamedInt.get('intelligine.basebug.move.explo')
22
+MODE_GOHOME = IncrementedNamedInt.get('intelligine.basebug.move.gohome')
23
+MODE_NURSE = IncrementedNamedInt.get('intelligine.basebug.move.nurse')
24
+MODE_HOME = IncrementedNamedInt.get('intelligine.basebug.move.home')
25
 
25
 
26
 MOVE_BYBASS = IncrementedNamedInt.get('intelligine.basebug.move.bypass')
26
 MOVE_BYBASS = IncrementedNamedInt.get('intelligine.basebug.move.bypass')
27
 MOVE_BYBASS_DISTANCE = IncrementedNamedInt.get('intelligine.basebug.move.bypass.distance')
27
 MOVE_BYBASS_DISTANCE = IncrementedNamedInt.get('intelligine.basebug.move.bypass.distance')

+ 12 - 12
intelligine/simulation/object/brain/AntBrain.py View File

1
 from intelligine.simulation.object.brain.Brain import Brain
1
 from intelligine.simulation.object.brain.Brain import Brain
2
 from intelligine.simulation.object.brain.part.attack.AttackBrainPart import AttackBrainPart
2
 from intelligine.simulation.object.brain.part.attack.AttackBrainPart import AttackBrainPart
3
 from intelligine.simulation.object.brain.part.move.AntMoveBrainPart import AntMoveBrainPart
3
 from intelligine.simulation.object.brain.part.move.AntMoveBrainPart import AntMoveBrainPart
4
-from intelligine.cst import MOVE_MODE, MOVE_MODE_EXPLO, MOVE_MODE_GOHOME, PHEROMON_DIR_EXPLO, \
5
-    BRAIN_PART_TAKE, BRAIN_PART_PUT, MOVE_MODE_NURSE, PHEROMON_DIR_NONE, BRAIN_PART_ATTACK, MOVE_MODE_HOME, \
4
+from intelligine.cst import MODE, MODE_EXPLO, MODE_GOHOME, PHEROMON_DIR_EXPLO, \
5
+    BRAIN_PART_TAKE, BRAIN_PART_PUT, MODE_NURSE, PHEROMON_DIR_NONE, BRAIN_PART_ATTACK, MODE_HOME, \
6
     SMELL_FOOD, SMELL_EGG
6
     SMELL_FOOD, SMELL_EGG
7
 from intelligine.cst import MOLECULE_SEARCHING
7
 from intelligine.cst import MOLECULE_SEARCHING
8
 from intelligine.cst import BRAIN_PART_MOVE
8
 from intelligine.cst import BRAIN_PART_MOVE
31
 
31
 
32
     def __init__(self, context, host):
32
     def __init__(self, context, host):
33
         super().__init__(context, host)
33
         super().__init__(context, host)
34
-        self._movement_mode = MOVE_MODE_HOME
34
+        self._movement_mode = MODE_HOME
35
         self._distance_from_objective = 0  # TODO rename: distance_since_objective
35
         self._distance_from_objective = 0  # TODO rename: distance_since_objective
36
         self._molecule_searching = PHEROMON_DIR_EXPLO
36
         self._molecule_searching = PHEROMON_DIR_EXPLO
37
 
37
 
38
     def switch_to_mode(self, mode):
38
     def switch_to_mode(self, mode):
39
         self._movement_mode = mode
39
         self._movement_mode = mode
40
         self._update_molecule_gland(mode)
40
         self._update_molecule_gland(mode)
41
-        self._context.metas.value.set(MOVE_MODE, self._host.get_id(), mode)
41
+        self._context.metas.value.set(MODE, self._host.get_id(), mode)
42
         self._update_molecule_searching(mode)
42
         self._update_molecule_searching(mode)
43
 
43
 
44
     def _update_molecule_gland(self, mode):
44
     def _update_molecule_gland(self, mode):
45
-        if mode == MOVE_MODE_EXPLO:
45
+        if mode == MODE_EXPLO:
46
             molecule_direction_type = None
46
             molecule_direction_type = None
47
-        elif mode == MOVE_MODE_GOHOME:
47
+        elif mode == MODE_GOHOME:
48
             molecule_direction_type = PHEROMON_DIR_EXPLO
48
             molecule_direction_type = PHEROMON_DIR_EXPLO
49
             self._distance_from_objective = 0
49
             self._distance_from_objective = 0
50
-        elif mode == MOVE_MODE_NURSE:
50
+        elif mode == MODE_NURSE:
51
             molecule_direction_type = None
51
             molecule_direction_type = None
52
-        elif mode == MOVE_MODE_HOME:
52
+        elif mode == MODE_HOME:
53
             molecule_direction_type = PHEROMON_DIR_EXPLO
53
             molecule_direction_type = PHEROMON_DIR_EXPLO
54
         else:
54
         else:
55
             raise NotImplementedError()
55
             raise NotImplementedError()
61
             self._host.get_movement_molecule_gland().disable()
61
             self._host.get_movement_molecule_gland().disable()
62
 
62
 
63
     def _update_molecule_searching(self, mode):
63
     def _update_molecule_searching(self, mode):
64
-        if mode == MOVE_MODE_EXPLO:
64
+        if mode == MODE_EXPLO:
65
             molecule_searching = PHEROMON_DIR_EXPLO
65
             molecule_searching = PHEROMON_DIR_EXPLO
66
-        elif mode == MOVE_MODE_GOHOME:
66
+        elif mode == MODE_GOHOME:
67
             molecule_searching = PHEROMON_DIR_NONE
67
             molecule_searching = PHEROMON_DIR_NONE
68
-        elif mode == MOVE_MODE_NURSE:
68
+        elif mode == MODE_NURSE:
69
             molecule_searching = PHEROMON_DIR_NONE
69
             molecule_searching = PHEROMON_DIR_NONE
70
-        elif mode == MOVE_MODE_HOME:
70
+        elif mode == MODE_HOME:
71
             # TODO: Ca depend de ce que fait la fourmis, si s'occupe des oeufs, etc
71
             # TODO: Ca depend de ce que fait la fourmis, si s'occupe des oeufs, etc
72
             molecule_searching = self.get_part(BRAIN_PART_TAKE).get_smell_target()
72
             molecule_searching = self.get_part(BRAIN_PART_TAKE).get_smell_target()
73
         else:
73
         else:

+ 9 - 9
intelligine/simulation/object/brain/part/move/AntMoveBrainPart.py View File

5
 from intelligine.synergy.event.move.direction import directions_modifiers, get_position_with_direction_decal
5
 from intelligine.synergy.event.move.direction import directions_modifiers, get_position_with_direction_decal
6
 from synergine_xyz.cst import POSITION
6
 from synergine_xyz.cst import POSITION
7
 from intelligine.core.exceptions import NoMolecule
7
 from intelligine.core.exceptions import NoMolecule
8
-from intelligine.cst import MOLECULE_SEARCHING, MOVE_MODE_EXPLO, MOVE_MODE_HOME, MOVE_MODE, MOVE_MODE_GOHOME, \
8
+from intelligine.cst import MOLECULE_SEARCHING, MODE_EXPLO, MODE_HOME, MODE, MODE_GOHOME, \
9
     EXPLORATION_VECTOR, MOLECULES_DIRECTION
9
     EXPLORATION_VECTOR, MOLECULES_DIRECTION
10
 from intelligine.simulation.molecule.DirectionMolecule import DirectionMolecule
10
 from intelligine.simulation.molecule.DirectionMolecule import DirectionMolecule
11
 
11
 
24
 
24
 
25
     @classmethod
25
     @classmethod
26
     def get_direction(cls, context, object_id):
26
     def get_direction(cls, context, object_id):
27
-        move_mode = context.metas.value.get(MOVE_MODE, object_id)
28
-        if move_mode == MOVE_MODE_GOHOME:
27
+        move_mode = context.metas.value.get(MODE, object_id)
28
+        if move_mode == MODE_GOHOME:
29
             return cls._get_direction_with_exploration_vector(context, object_id)
29
             return cls._get_direction_with_exploration_vector(context, object_id)
30
         else:
30
         else:
31
             try:
31
             try:
102
         """
102
         """
103
         movement_mode = self._host_brain.get_movement_mode()
103
         movement_mode = self._host_brain.get_movement_mode()
104
 
104
 
105
-        if movement_mode == MOVE_MODE_GOHOME and self._on_home_smell(self._context, self._host.get_id()):
105
+        if movement_mode == MODE_GOHOME and self._on_home_smell(self._context, self._host.get_id()):
106
             self._arrived_at_home()
106
             self._arrived_at_home()
107
 
107
 
108
-        elif movement_mode == MOVE_MODE_HOME and not self._on_home_smell(self._context, self._host.get_id()):
108
+        elif movement_mode == MODE_HOME and not self._on_home_smell(self._context, self._host.get_id()):
109
             self._start_new_exploration()
109
             self._start_new_exploration()
110
 
110
 
111
-        elif movement_mode == MOVE_MODE_EXPLO and self._on_home_smell(self._context, self._host.get_id()):
111
+        elif movement_mode == MODE_EXPLO and self._on_home_smell(self._context, self._host.get_id()):
112
             self._init_exploration_vector()
112
             self._init_exploration_vector()
113
 
113
 
114
         # TODO: sitch explo si rien a faire (rien a poser par exemple) et HOME
114
         # TODO: sitch explo si rien a faire (rien a poser par exemple) et HOME
136
 
136
 
137
     def _apply_context(self):
137
     def _apply_context(self):
138
         movement_mode = self._host_brain.get_movement_mode()
138
         movement_mode = self._host_brain.get_movement_mode()
139
-        if movement_mode == MOVE_MODE_EXPLO or movement_mode == MOVE_MODE_GOHOME:
139
+        if movement_mode == MODE_EXPLO or movement_mode == MODE_GOHOME:
140
             self._update_exploration_vector()
140
             self._update_exploration_vector()
141
 
141
 
142
     def _start_new_exploration(self):
142
     def _start_new_exploration(self):
143
         self._reinit_exploration_vector()
143
         self._reinit_exploration_vector()
144
-        self._host_brain.switch_to_mode(MOVE_MODE_EXPLO)
144
+        self._host_brain.switch_to_mode(MODE_EXPLO)
145
 
145
 
146
     def _init_exploration_vector(self):
146
     def _init_exploration_vector(self):
147
         # On vient de rentrer dans le monde exterieur, le vecteur de départ pointe vers la case précedente
147
         # On vient de rentrer dans le monde exterieur, le vecteur de départ pointe vers la case précedente
150
         self._set_exploration_vector(init_exploration_vector)
150
         self._set_exploration_vector(init_exploration_vector)
151
 
151
 
152
     def _arrived_at_home(self):
152
     def _arrived_at_home(self):
153
-        self._host_brain.switch_to_mode(MOVE_MODE_HOME)
153
+        self._host_brain.switch_to_mode(MODE_HOME)
154
         ant_star = self._get_by_pass_brain(self._context, self._host.get_id())
154
         ant_star = self._get_by_pass_brain(self._context, self._host.get_id())
155
         ant_star.erase()
155
         ant_star.erase()

+ 6 - 6
intelligine/simulation/object/brain/part/transport/AntPutBrainPart.py View File

1
 from intelligine.core.exceptions import CantFindWhereToPut
1
 from intelligine.core.exceptions import CantFindWhereToPut
2
-from intelligine.cst import MOVE_MODE_EXPLO, TYPE_RESOURCE_EXPLOITABLE, CARRIED, MOVE_MODE_NURSE, TYPE_NURSERY, \
3
-    MOVE_MODE_HOME, TYPE_RESOURCE_EATABLE, TYPE, MOVE_MODE, MOVE_MODE_GOHOME
2
+from intelligine.cst import MODE_EXPLO, TYPE_RESOURCE_EXPLOITABLE, CARRIED, MODE_NURSE, TYPE_NURSERY, \
3
+    MODE_HOME, TYPE_RESOURCE_EATABLE, TYPE, MODE, MODE_GOHOME
4
 from intelligine.simulation.object.brain.part.transport.TransportBrainPart import TransportBrainPart
4
 from intelligine.simulation.object.brain.part.transport.TransportBrainPart import TransportBrainPart
5
 from intelligine.synergy.object.Food import Food
5
 from intelligine.synergy.object.Food import Food
6
 from synergine_xyz.cst import POSITION, POSITIONS
6
 from synergine_xyz.cst import POSITION, POSITIONS
10
 
10
 
11
     # TODO: methode __nit_ pour la classe ?
11
     # TODO: methode __nit_ pour la classe ?
12
     _mode_matches = {
12
     _mode_matches = {
13
-        MOVE_MODE_NURSE: [TYPE_NURSERY],
14
-        MOVE_MODE_HOME: [TYPE_RESOURCE_EATABLE],
15
-        MOVE_MODE_GOHOME: []
13
+        MODE_NURSE: [TYPE_NURSERY],
14
+        MODE_HOME: [TYPE_RESOURCE_EATABLE],
15
+        MODE_GOHOME: []
16
     }
16
     }
17
 
17
 
18
     _types_matches = {
18
     _types_matches = {
65
         # TODO: Il faut refact/logique qqpart pour ca !! Genre Brain.done(PUT, ??)
65
         # TODO: Il faut refact/logique qqpart pour ca !! Genre Brain.done(PUT, ??)
66
         if isinstance(puted_object, Food):
66
         if isinstance(puted_object, Food):
67
             # TODO: Quel mode ? On vient de poser (ps forcement dans la colonie) cls._mode_swicth ?
67
             # TODO: Quel mode ? On vient de poser (ps forcement dans la colonie) cls._mode_swicth ?
68
-            self._host.get_brain().switch_to_mode(MOVE_MODE_EXPLO)
68
+            self._host.get_brain().switch_to_mode(MODE_EXPLO)
69
             # TODO: TEST Depose au -1 pour des raisons de test. Plus tard ce sera des tas comme un autre !
69
             # TODO: TEST Depose au -1 pour des raisons de test. Plus tard ce sera des tas comme un autre !
70
             puted_object.set_position((-1, 0, 0))
70
             puted_object.set_position((-1, 0, 0))
71
 
71
 

+ 6 - 6
intelligine/simulation/object/brain/part/transport/AntTakeBrainPart.py View File

1
 from intelligine.simulation.object.brain.part.transport.TakeBrainPart import TakeBrainPart
1
 from intelligine.simulation.object.brain.part.transport.TakeBrainPart import TakeBrainPart
2
 from intelligine.synergy.object.ressource.Ressource import Resource
2
 from intelligine.synergy.object.ressource.Ressource import Resource
3
-from intelligine.cst import MOVE_MODE_EXPLO, TYPE_RESOURCE_EXPLOITABLE, \
4
-    MOVE_MODE_GOHOME, MOVE_MODE_NURSE, TYPE_NURSERY
3
+from intelligine.cst import MODE_EXPLO, TYPE_RESOURCE_EXPLOITABLE, \
4
+    MODE_GOHOME, MODE_NURSE, TYPE_NURSERY
5
 
5
 
6
 
6
 
7
 class AntTakeBrainPart(TakeBrainPart):
7
 class AntTakeBrainPart(TakeBrainPart):
8
 
8
 
9
     # TODO: methode __init_ pour la classe ? Pour surcharger ici.
9
     # TODO: methode __init_ pour la classe ? Pour surcharger ici.
10
     _mode_matches = {
10
     _mode_matches = {
11
-        MOVE_MODE_EXPLO: [TYPE_RESOURCE_EXPLOITABLE],
12
-        MOVE_MODE_NURSE: [TYPE_NURSERY],
13
-        MOVE_MODE_GOHOME: []
11
+        MODE_EXPLO: [TYPE_RESOURCE_EXPLOITABLE],
12
+        MODE_NURSE: [TYPE_NURSERY],
13
+        MODE_GOHOME: []
14
     }
14
     }
15
 
15
 
16
     def __init__(self, host_brain):
16
     def __init__(self, host_brain):
32
         # TODO: qqch plus generique ... (attention aux eggs)
32
         # TODO: qqch plus generique ... (attention aux eggs)
33
         if isinstance(take_object, Resource):
33
         if isinstance(take_object, Resource):
34
             self._smell_target = self._host_brain.get_smell_for_object_taken(take_object)
34
             self._smell_target = self._host_brain.get_smell_for_object_taken(take_object)
35
-            self._host.get_brain().switch_to_mode(MOVE_MODE_GOHOME)
35
+            self._host.get_brain().switch_to_mode(MODE_GOHOME)
36
             self._host.get_movement_molecule_gland().appose()
36
             self._host.get_movement_molecule_gland().appose()

+ 2 - 2
intelligine/simulation/object/brain/part/transport/TransportBrainPart.py View File

1
-from intelligine.cst import MOVE_MODE, TYPE
1
+from intelligine.cst import MODE, TYPE
2
 from intelligine.simulation.object.brain.part.BrainPart import BrainPart
2
 from intelligine.simulation.object.brain.part.BrainPart import BrainPart
3
 
3
 
4
 
4
 
9
 
9
 
10
     @classmethod
10
     @classmethod
11
     def _match_with_mode(cls, context, object_id, concerned_object_id):
11
     def _match_with_mode(cls, context, object_id, concerned_object_id):
12
-        move_mode = context.metas.value.get(MOVE_MODE, object_id)
12
+        move_mode = context.metas.value.get(MODE, object_id)
13
         for takable_type in cls._mode_matches[move_mode]:
13
         for takable_type in cls._mode_matches[move_mode]:
14
             if context.metas.list.have(TYPE, concerned_object_id, takable_type, allow_empty=True):
14
             if context.metas.list.have(TYPE, concerned_object_id, takable_type, allow_empty=True):
15
                 return True
15
                 return True

+ 4 - 4
intelligine/synergy/object/ant/Ant.py View File

1
 from intelligine.core.exceptions import MoleculeException
1
 from intelligine.core.exceptions import MoleculeException
2
 from intelligine.synergy.object.Bug import Bug
2
 from intelligine.synergy.object.Bug import Bug
3
 from intelligine.cst import CARRYING, TRANSPORTER, ATTACKER, COL_TRANSPORTER, COL_TRANSPORTER_NOT_CARRYING, \
3
 from intelligine.cst import CARRYING, TRANSPORTER, ATTACKER, COL_TRANSPORTER, COL_TRANSPORTER_NOT_CARRYING, \
4
-    COL_FIGHTER, MOVE_MODE_EXPLO, MOVE_MODE_GOHOME, BODY_PART_PHEROMONE_GLAND, TYPE, TYPE_ANT, \
5
-    COL_TRANSPORTER_CARRYING, MOVE_MODE_NURSE, MOVE_MODE_HOME
4
+    COL_FIGHTER, MODE_EXPLO, MODE_GOHOME, BODY_PART_PHEROMONE_GLAND, TYPE, TYPE_ANT, \
5
+    COL_TRANSPORTER_CARRYING, MODE_NURSE, MODE_HOME
6
 from intelligine.synergy.object.Food import Food
6
 from intelligine.synergy.object.Food import Food
7
 from intelligine.simulation.object.molecule.MovementMoleculeGland import MovementMoleculeGland
7
 from intelligine.simulation.object.molecule.MovementMoleculeGland import MovementMoleculeGland
8
 from intelligine.simulation.object.brain.AntBrain import AntBrain
8
 from intelligine.simulation.object.brain.AntBrain import AntBrain
22
                                                            COL_TRANSPORTER_NOT_CARRYING,
22
                                                            COL_TRANSPORTER_NOT_CARRYING,
23
                                                            COL_FIGHTER])
23
                                                            COL_FIGHTER])
24
         self._carried = None
24
         self._carried = None
25
-        self._brain.switch_to_mode(MOVE_MODE_EXPLO)
25
+        self._brain.switch_to_mode(MODE_EXPLO)
26
         context.metas.list.add(TYPE, self.get_id(), TYPE_ANT)
26
         context.metas.list.add(TYPE, self.get_id(), TYPE_ANT)
27
 
27
 
28
     def die(self):
28
     def die(self):
58
         obj.set_is_carried(True, self)
58
         obj.set_is_carried(True, self)
59
         # TODO: pour le moment hardcode, a gerer dans AntTakeBrainPart (callback en fct de ce qui est depose)
59
         # TODO: pour le moment hardcode, a gerer dans AntTakeBrainPart (callback en fct de ce qui est depose)
60
         if isinstance(obj, Food):
60
         if isinstance(obj, Food):
61
-            self.get_brain().switch_to_mode(MOVE_MODE_GOHOME)
61
+            self.get_brain().switch_to_mode(MODE_GOHOME)
62
             self.get_movement_molecule_gland().appose()
62
             self.get_movement_molecule_gland().appose()
63
 
63
 
64
     def is_carrying(self):
64
     def is_carrying(self):

+ 9 - 9
intelligine/tests/simulation/mode/TestChangeMode.py View File

11
 from synergine.synergy.collection.SynergyCollection import SynergyCollection
11
 from synergine.synergy.collection.SynergyCollection import SynergyCollection
12
 from synergine.synergy.collection.Configuration import Configuration
12
 from synergine.synergy.collection.Configuration import Configuration
13
 from intelligine.core.Context import Context
13
 from intelligine.core.Context import Context
14
-from intelligine.cst import MOVE_MODE_EXPLO, MOVE_MODE_GOHOME, MOVE_MODE, MOVE_MODE_HOME, PHEROMON_DIR_NONE
14
+from intelligine.cst import MODE_EXPLO, MODE_GOHOME, MODE, MODE_HOME, PHEROMON_DIR_NONE
15
 from intelligine.cst import PHEROMON_DIR_EXPLO
15
 from intelligine.cst import PHEROMON_DIR_EXPLO
16
 
16
 
17
 
17
 
25
 
25
 
26
     @staticmethod
26
     @staticmethod
27
     def _force_move(self_move_action, object_id, context):
27
     def _force_move(self_move_action, object_id, context):
28
-        object_movement_mode = context.metas.value.get(MOVE_MODE, object_id)
29
-        if object_movement_mode == MOVE_MODE_GOHOME or object_movement_mode == MOVE_MODE_HOME:
28
+        object_movement_mode = context.metas.value.get(MODE, object_id)
29
+        if object_movement_mode == MODE_GOHOME or object_movement_mode == MODE_HOME:
30
             return SOUTH
30
             return SOUTH
31
         return NORTH
31
         return NORTH
32
 
32
 
104
     def test_from_exploration_to_go_home(self):
104
     def test_from_exploration_to_go_home(self):
105
         self._run_and_get_core(0)
105
         self._run_and_get_core(0)
106
         self.assertEquals((0, 0, 0), self.ant.get_position())
106
         self.assertEquals((0, 0, 0), self.ant.get_position())
107
-        self.assertEquals(MOVE_MODE_EXPLO, self.ant.get_brain().get_movement_mode())
107
+        self.assertEquals(MODE_EXPLO, self.ant.get_brain().get_movement_mode())
108
         self.assertFalse(self.ant.is_carrying())
108
         self.assertFalse(self.ant.is_carrying())
109
 
109
 
110
         self._run_and_get_core(1)
110
         self._run_and_get_core(1)
111
         self.assertEquals((0, 0, -1), self.ant.get_position())
111
         self.assertEquals((0, 0, -1), self.ant.get_position())
112
-        self.assertEquals(MOVE_MODE_EXPLO, self.ant.get_brain().get_movement_mode())
112
+        self.assertEquals(MODE_EXPLO, self.ant.get_brain().get_movement_mode())
113
         self.assertFalse(self.ant.is_carrying())
113
         self.assertFalse(self.ant.is_carrying())
114
 
114
 
115
         # Ant has take Food piece
115
         # Ant has take Food piece
121
         molecule = self.ant.get_movement_molecule_gland().get_molecule()
121
         molecule = self.ant.get_movement_molecule_gland().get_molecule()
122
         # Now it appose exploration molecule
122
         # Now it appose exploration molecule
123
         self.assertEquals((PHEROMON_DIR_EXPLO, 0), (molecule.get_type(), molecule.get_distance()))
123
         self.assertEquals((PHEROMON_DIR_EXPLO, 0), (molecule.get_type(), molecule.get_distance()))
124
-        self.assertEquals(MOVE_MODE_GOHOME, self.ant.get_brain().get_movement_mode())
124
+        self.assertEquals(MODE_GOHOME, self.ant.get_brain().get_movement_mode())
125
         self.assertEquals(PHEROMON_DIR_EXPLO, self.ant.get_movement_molecule_gland().get_molecule_type())
125
         self.assertEquals(PHEROMON_DIR_EXPLO, self.ant.get_movement_molecule_gland().get_molecule_type())
126
 
126
 
127
         self._run_and_get_core(32)
127
         self._run_and_get_core(32)
128
         self.assertEquals((0, 0, -6), self.ant.get_position())
128
         self.assertEquals((0, 0, -6), self.ant.get_position())
129
         self.assertTrue(self.ant.is_carrying())
129
         self.assertTrue(self.ant.is_carrying())
130
-        self.assertEquals(MOVE_MODE_HOME, self.ant.get_brain().get_movement_mode())
130
+        self.assertEquals(MODE_HOME, self.ant.get_brain().get_movement_mode())
131
 
131
 
132
         self._run_and_get_core(33)
132
         self._run_and_get_core(33)
133
         self.assertEquals((0, 0, -5), self.ant.get_position())
133
         self.assertEquals((0, 0, -5), self.ant.get_position())
134
         self.assertTrue(self.ant.is_carrying())
134
         self.assertTrue(self.ant.is_carrying())
135
-        self.assertEquals(MOVE_MODE_HOME, self.ant.get_brain().get_movement_mode())
135
+        self.assertEquals(MODE_HOME, self.ant.get_brain().get_movement_mode())
136
 
136
 
137
         self._run_and_get_core(34)
137
         self._run_and_get_core(34)
138
         self.assertEquals((0, 0, -4), self.ant.get_position())
138
         self.assertEquals((0, 0, -4), self.ant.get_position())
139
-        self.assertEquals(MOVE_MODE_HOME, self.ant.get_brain().get_movement_mode())
139
+        self.assertEquals(MODE_HOME, self.ant.get_brain().get_movement_mode())
140
 
140
 
141
         self._run_and_get_core(37)
141
         self._run_and_get_core(37)
142
         self.assertEquals((0, 0, -1), self.ant.get_position())
142
         self.assertEquals((0, 0, -1), self.ant.get_position())