+ if not self.id_ == self.game.player_id:
+ return
+ edge_left = self.position[1].x - self._radius
+ edge_right = self.position[1].x + self._radius
+ edge_up = self.position[1].y - self._radius
+ edge_down = self.position[1].y + self._radius
+ if edge_left < 0:
+ self.game.get_map(self.position[0] + YX(1,-1))
+ self.game.get_map(self.position[0] + YX(0,-1))
+ self.game.get_map(self.position[0] + YX(-1,-1))
+ if edge_right >= self.game.map_size.x:
+ self.game.get_map(self.position[0] + YX(1,1))
+ self.game.get_map(self.position[0] + YX(0,1))
+ self.game.get_map(self.position[0] + YX(-1,1))
+ if edge_up < 0:
+ self.game.get_map(self.position[0] + YX(-1,1))
+ self.game.get_map(self.position[0] + YX(-1,0))
+ self.game.get_map(self.position[0] + YX(-1,-1))
+ if edge_down >= self.game.map_size.y:
+ self.game.get_map(self.position[0] + YX(1,1))
+ self.game.get_map(self.position[0] + YX(1,0))
+ self.game.get_map(self.position[0] + YX(1,-1))
+ #alternative
+ #if self.position[1].x < self._radius:
+ # self.game.get_map(self.position[0] - YX(0,1))
+ #if self.position[1].y < self._radius:
+ # self.game.get_map(self.position[0] - YX(1,0))
+ #if self.position[1].x > self.game.map_size.x - self._radius:
+ # self.game.get_map(self.position[0] + YX(0,1))
+ #if self.position[1].y > self.game.map_size.y - self._radius:
+ # self.game.get_map(self.position[0] + YX(1,0))
+ #if self.position[1].y < self._radius and \
+ # self.position[1].x <= [pos for pos in
+ # diagonal_distance_edge
+ # if pos.y == self.position[1].y][0].x:
+ # self.game.get_map(self.position[0] - YX(1,1))