Hmm, how about you doing it the other way around:
1. Iterate over each point. 2. Find out how close it is to its closest enemy. 3. Choose the point that is furthest from its closest enemy.
There are many opportunities for early outs:
Within the loop store the currently furthest point. If you are then inspecting another point and find out it has a closer enemy, you can immediately skip to the next point
[edit]: also, if you work with the grid as described above, you can
1. Check if there an enemy on the currently processed point *before* iterating through other enemies. That way you can exclude it as early as possible. 2. If it a densely populated grid, consider doing a breadth-first flood-fill starting at the current point. That might find the closest enemy much faster than iterating though all of them.
source share