Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for x in xrange(new_star_coords[0]-min_star_dist,new_star_coords[0]+min_star_dist+1):
- # TODO: localize .remove to speed things up
- for y in xrange(new_star_coords[1]-min_star_dist,new_star_coords[1]+min_star_dist+1):
- try: self.empty_sectors.remove((x,y)) # remove all sectors that are within than min_star_dist to avoid placing any new stars there
- except ValueError: pass # remove fails if the sectors as already been removed, but that is intended
Add Comment
Please, Sign In to add comment