Guest User

Untitled

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