|
@@ -1,8 +1,9 @@
|
1
|
|
-from antstar.GlueWallAntBrain import GlueWallAntBrain
|
2
|
|
-from intelligine.cst import EXPLORATION_VECTOR, MOVE_BYBASS, MOVE_BYBASS_DISTANCE, MOVE_BYBASS_MEMORY, MOVE_BYBASS_WALL, MOVE_BYBASS_RE_WALKING
|
|
1
|
+from antstar.StickWallAntBrain import StickWallAntBrain
|
|
2
|
+from intelligine.cst import EXPLORATION_VECTOR, MOVE_BYBASS, MOVE_BYBASS_DISTANCE, MOVE_BYBASS_MEMORY, MOVE_BYBASS_WALL,\
|
|
3
|
+ MOVE_BYBASS_PREV_WALL
|
3
|
4
|
|
4
|
5
|
|
5
|
|
-class ByPass(GlueWallAntBrain):
|
|
6
|
+class ByPass(StickWallAntBrain):
|
6
|
7
|
|
7
|
8
|
def __init__(self, host, home_vector, context, object_id):
|
8
|
9
|
"""
|
|
@@ -30,14 +31,14 @@ class ByPass(GlueWallAntBrain):
|
30
|
31
|
object_id,
|
31
|
32
|
allow_empty=True,
|
32
|
33
|
empty_value=None)
|
33
|
|
- self._current_wall_square_position = context.metas.value.get(MOVE_BYBASS_WALL,
|
34
|
|
- object_id,
|
35
|
|
- allow_empty=True,
|
36
|
|
- empty_value=None)
|
37
|
|
- self._is_re_walking = context.metas.value.get(MOVE_BYBASS_RE_WALKING,
|
38
|
|
- object_id,
|
39
|
|
- allow_empty=True,
|
40
|
|
- empty_value=False)
|
|
34
|
+ self._current_wall_position = context.metas.value.get(MOVE_BYBASS_WALL,
|
|
35
|
+ object_id,
|
|
36
|
+ allow_empty=True,
|
|
37
|
+ empty_value=None)
|
|
38
|
+ self._previous_wall_position = context.metas.value.get(MOVE_BYBASS_PREV_WALL,
|
|
39
|
+ object_id,
|
|
40
|
+ allow_empty=True,
|
|
41
|
+ empty_value=None)
|
41
|
42
|
|
42
|
43
|
def _set_home_vector(self, home_vector):
|
43
|
44
|
super()._set_home_vector(home_vector)
|
|
@@ -55,10 +56,10 @@ class ByPass(GlueWallAntBrain):
|
55
|
56
|
super()._set_distance_when_blocked(distance)
|
56
|
57
|
self._context.metas.value.set(MOVE_BYBASS_DISTANCE, self._object_id, distance)
|
57
|
58
|
|
58
|
|
- def _set_current_wall_square(self, position_of_square):
|
59
|
|
- super()._set_current_wall_square(position_of_square)
|
60
|
|
- self._context.metas.value.set(MOVE_BYBASS_WALL, self._object_id, position_of_square)
|
|
59
|
+ def _set_current_wall_position(self, position):
|
|
60
|
+ super()._set_current_wall_position(position)
|
|
61
|
+ self._context.metas.value.set(MOVE_BYBASS_WALL, self._object_id, position)
|
61
|
62
|
|
62
|
|
- def _set_is_re_walking(self, is_re_walking):
|
63
|
|
- super()._set_is_re_walking(is_re_walking)
|
64
|
|
- self._context.metas.value.set(MOVE_BYBASS_RE_WALKING, self._object_id, is_re_walking)
|
|
63
|
+ def _set_previous_wall_position(self, position):
|
|
64
|
+ super()._set_previous_wall_position(position)
|
|
65
|
+ self._context.metas.value.set(MOVE_BYBASS_PREV_WALL, self._object_id, position)
|