Hello,
am following this tutorial
http://zetcode.com/tutorials/javagamestutorial/collision/
and i didn’t understand the need of this line in the Board class
(ctrl+f to find it easily )
Missile m = (Missile) ms.get(i);
and this
Alien a = (Alien) aliens.get(i);
i know that the variables “m” and “a” are the temporary missile and alien inside the loops, but why the casting ?
(Missile) ms.get(i) ??
i really don’t know why i had to cast
thank you