Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def enqueue_points(self, agent_position):
if not self.allow_enqueue:
return
if not self._check_visited or not any(map(lambda p: distance(p, agent_position) < self.distance_threshold, self.visited_seen_points)):
self.enqueue_point(BFSSearchPoint(agent_position, dict(x=-1 * self.grid_size)))
self.enqueue_point(BFSSearchPoint(agent_position, dict(x=self.grid_size)))
self.enqueue_point(BFSSearchPoint(agent_position, dict(z=-1 * self.grid_size)))
self.enqueue_point(BFSSearchPoint(agent_position, dict(z=1 * self.grid_size)))
self.visited_seen_points.append(agent_position)
def enqueue_points(self, agent_position):
if not self.allow_enqueue:
return
if not self._check_visited or not any(map(lambda p: distance(p, agent_position) < self.distance_threshold, self.visited_seen_points)):
self.enqueue_point(BFSSearchPoint(agent_position, dict(x=-1 * self.grid_size)))
self.enqueue_point(BFSSearchPoint(agent_position, dict(x=self.grid_size)))
self.enqueue_point(BFSSearchPoint(agent_position, dict(z=-1 * self.grid_size)))
self.enqueue_point(BFSSearchPoint(agent_position, dict(z=1 * self.grid_size)))
self.visited_seen_points.append(agent_position)