// How fast does this go? Does UDP try to slow it down, or does
// this cause network problems? (hint: yes for an unlimited send
// rate, unlike TCP). How do you know on the receiving side
// that you haven't received a duplicate UDP packet, out of
// order packet, or dropped packet?
for(intidx=0;idx<100;idx++)
{
xPos=xPos+(Math.cos(Math.toRadians(direction))*velocity);//computes the horixontal displacement for each movement based on velocity - this is a fixed velocity and time increment
yPos=yPos+(Math.sin(Math.toRadians(direction))*velocity);//computes the vertical displacement for each movement based on velocity - this is a fixed velocity and time increment
// How fast does this go? Does UDP try to slow it down, or does
// this cause network problems? (hint: yes for an unlimited send
// rate, unlike TCP). How do you know on the receiving side
// that you haven't received a duplicate UDP packet, out of
// order packet, or dropped packet?
for(intidx=0;idx<100;idx++)
{
xPos=xPos+(Math.cos(Math.toRadians(direction))*velocity);//computes the horixontal displacement for each movement based on velocity - this is a fixed velocity and time increment
yPos=yPos+(Math.sin(Math.toRadians(direction))*velocity);//computes the vertical displacement for each movement based on velocity - this is a fixed velocity and time increment