+ if len(self.changed_tiles) > 0:
+ for t in [t for t in self.things if t.type_ == 'Player']:
+ fov_radius = 12 # TODO: un-hardcode
+ absolute_position =\
+ self.map_geometry.undouble_yxyx(t.position[0],
+ t.position[1])
+ y_range_start = absolute_position.y - fov_radius
+ y_range_end = absolute_position.y + fov_radius
+ x_range_start = absolute_position.x - fov_radius
+ x_range_end = absolute_position.x + fov_radius
+ for position in self.changed_tiles:
+ if position.y < y_range_start\
+ or position.y > y_range_end:
+ continue
+ if position.x < x_range_start\
+ or position.x > x_range_end:
+ continue
+ t.invalidate_map_view()
+ break