Let's say I got 100 birds on screen. The player must draw a line to cover x number of birds and close the line to form a loop. The loop does not have to be a circle but no part of the line shall intersect itself. It could be shaped anything, BUT the line must be closed.
Now, my actual problem is this: with this closed loop that can be shaped anything, how can I count how many birds are actually inside the loop? The birds' positions scatter randomly and they move around.