merovingien / AIWar

Create your Artificial Intelligence to win the war
GNU General Public License v3.0
4 stars 2 forks source link

Does distanceTo() works with other item ? #8

Closed leguims closed 12 years ago

leguims commented 12 years ago

Est-ce que la methode "distanceTo()" ne fonctionne que pour soi ? Ca peut etre utile que cette fonction soit utilisable pour tous les vaisseaux : soi-meme et des distants (amis/ennemis).

merovingien commented 12 years ago

Yes, distanceTo is designed to get distance between itself and another item, and it will probably not change.

However, you should be capable to calculate distance between two items if you know their respective positions, which is generally the case.