def tag_obs(self, radius): self.untag_obs() for otherAgents in self.world.obstacles: to = self.pos - otherAgents.pos gap = radius + otherAgents.radius if Vector2D.length_sq(to) < gap**2: otherAgents.tagged = True;
def tag_neighbours(self, radius): self.untag() for otherAgents in self.world.agents: to = self.pos - otherAgents.pos gap = radius + otherAgents.tag_radius if Vector2D.length_sq(to) < gap**2: otherAgents.tagged = True
def tag_neighbours(self, radius): self.untag() for otherAgents in self.world.agents: to = self.pos - otherAgents.pos gap = radius + otherAgents.tag_radius if Vector2D.length_sq(to) < gap**2: otherAgents.tagged = True;