Believe it or not I did do something simliar to that for a turn based system I was tweaking around with, but in my case the attacker was always pointed the correct way and I knew ahead of time which enemy I was attacking.


Optimism is an occupational hazard of programming: feedback is the treament.
Kent Beck