# Path: intelligine/cst.py
# EXPLORATION_VECTOR = IncrementedNamedInt.get('intelligine.exploration_vector')
# 
# MOVE_BYBASS = IncrementedNamedInt.get('intelligine.basebug.move.bypass')
# 
# MOVE_BYBASS_DISTANCE = IncrementedNamedInt.get('intelligine.basebug.move.bypass.distance')
# 
# MOVE_BYBASS_MEMORY = IncrementedNamedInt.get('intelligine.basebug.move.bypass.memory')
# 
# MOVE_BYBASS_WALL = IncrementedNamedInt.get('intelligine.basebug.move.bypass.wall')
# 
# MOVE_BYBASS_PREV_WALL = IncrementedNamedInt.get('intelligine.basebug.move.bypass.prev_wall')


from antstar.StickWallAntBrain import StickWallAntBrain
from intelligine.cst import EXPLORATION_VECTOR, MOVE_BYBASS, MOVE_BYBASS_DISTANCE, MOVE_BYBASS_MEMORY, MOVE_BYBASS_WALL,\
    MOVE_BYBASS_PREV_WALL


class ByPass(StickWallAntBrain):

    def __init__(self, host, home_vector, context, object_id):
        """

        Note: We broke Liskov principle here.

        :param host:
        :param home_vector:
        :param context:
        :param object_id:
        :return:
        """
        super().__init__(host, home_vector)
        self._context = context
        self._object_id = object_id
        self._memory_since_blocked = context.metas.value.get(MOVE_BYBASS_MEMORY,
                                                             object_id,
                                                             allow_empty=True,
                                                             empty_value=[])
        self._by_passing = context.metas.value.get(MOVE_BYBASS,
                                                   object_id,
                                                   allow_empty=True,
                                                   empty_value=False)

# Path: intelligine/cst.py
# EXPLORATION_VECTOR = IncrementedNamedInt.get('intelligine.exploration_vector')
# 
# MOVE_BYBASS = IncrementedNamedInt.get('intelligine.basebug.move.bypass')
# 
# MOVE_BYBASS_DISTANCE = IncrementedNamedInt.get('intelligine.basebug.move.bypass.distance')
# 
# MOVE_BYBASS_MEMORY = IncrementedNamedInt.get('intelligine.basebug.move.bypass.memory')
# 
# MOVE_BYBASS_WALL = IncrementedNamedInt.get('intelligine.basebug.move.bypass.wall')
# 
# MOVE_BYBASS_PREV_WALL = IncrementedNamedInt.get('intelligine.basebug.move.bypass.prev_wall')


# Path: intelligine/simulation/object/brain/part/move/AntStar/ByPass.py
from antstar.StickWallAntBrain import StickWallAntBrain
from intelligine.cst import EXPLORATION_VECTOR, MOVE_BYBASS, MOVE_BYBASS_DISTANCE, MOVE_BYBASS_MEMORY, MOVE_BYBASS_WALL,\
    MOVE_BYBASS_PREV_WALL



class ByPass(StickWallAntBrain):

    def __init__(self, host, home_vector, context, object_id):
        """

        Note: We broke Liskov principle here.

        :param host:
        :param home_vector:
        :param context:
        :param object_id:
        :return:
        """
        super().__init__(host, home_vector)
        self._context = context
        self._object_id = object_id
        self._memory_since_blocked = context.metas.value.get(MOVE_BYBASS_MEMORY,
                                                             object_id,
                                                             allow_empty=True,
                                                             empty_value=[])
        self._by_passing = context.metas.value.get(MOVE_BYBASS,
                                                   object_id,
                                                   allow_empty=True,
                                                   empty_value=False)

        self._distance_when_blocked = context.metas.value.get(MOVE_BYBASS_DISTANCE,