
public class Missile 
{
	
		 int x;
		 int y;
		 int angle;
		 int speed;

		 Missile(int x, int y, int angle, int speed) 
		 {
			 this.x = x;
			 this.y = y;

			 this.angle = angle;

			 this.speed = speed;

		 }

		 public void move() 
		 {
			 x += Math.cos(Math.toRadians(angle))*speed;
			 y += Math.sin(Math.toRadians(angle))*speed;
		 }
		
}

@@ -1,8 +1,31 @@
+import java.awt.Image;%0A
 %0Apublic 
@@ -46,20 +46,29 @@
 %0A%7B%0A%09
+Image type;
 %0A%09
-%09 
 int x;%0A%09
 %09 in
@@ -67,18 +67,16 @@
 x;%0A%09
-%09 
 int y;%0A%09
 %09 in
@@ -71,18 +71,16 @@
 int y;%0A%09
-%09 
 int angl
@@ -85,35 +85,87 @@
 gle;
-%0A%09%09 int speed;%0A%0A%09%09 Missile(
+// 0 is direct.%0A%09int speed;%0A%09int who;// 0: plane, 1: enemy%0A%09Missile(Image img, 
 int 
@@ -182,36 +182,41 @@
 int 
-angle
+speed, int who
 , int 
-speed
+angle
 ) %0A%09
-%09 
 %7B%0A%09%09
-%09
- 
 this
@@ -225,18 +225,16 @@
  = x;%0A%09%09
-%09
- 
 this.y =
@@ -236,26 +236,24 @@
 s.y = y;%0A%0A%09%09
-%09
- 
 this.angle =
@@ -263,18 +263,16 @@
 gle;%0A%0A%09%09
-%09 
 this.spe
@@ -287,18 +287,31 @@
 ed;%0A
-%0A
 %09%09
- 
+this.who = who;%0A%09
 %7D%0A%0A%09
-%09 
 publ
@@ -331,16 +331,37 @@
 ) %0A%09
+%7B%0A%09%09if(this.who == 0)%0A%09
 %09
- 
 %7B%0A%09%09%09
- 
 x +=
@@ -403,17 +403,16 @@
 eed;%0A%09%09%09
- 
 y += Mat
@@ -449,16 +449,127 @@
 peed;%0A%09%09
- 
+%7D%0A%09%09else%0A%09%09%7B%0A%09%09%09x -= Math.cos(Math.toRadians(angle))*speed;%0A%09%09%09y -= Math.sin(Math.toRadians(angle))*speed;%0A%09%09%7D%0A%09
 %7D%0A%09%09%0A%7D%0A

fix missile class. refs #43