blitzxion / Tanks.js

Using Javascript and HTML5, watch the AI build up their army and battle each other!
12 stars 4 forks source link

EVADE should pick a random point in heal circle, not leading edge. #16

Closed derekgates closed 12 years ago

derekgates commented 12 years ago

EVADING units currently all rush to the same 1pixel inset point in a healing radius. All units group at that point (as it's the closest to them).

Instead pick a random point in the healing circle as the destination X,Y.

http://stackoverflow.com/questions/4707796/use-x-y-coordinates-to-plot-points-inside-a-circle http://jsfiddle.net/YL6Bj/1/