import java.awt.*;

/**
 *
 */
public class Shot implements Runnable {


    private int shotSpeed = 10;

    private int SHOT_WIDTH  = 2;
    private int SHOT_HEIGHT = 5;    
    
    private int x = 0;

    private int shotHeight = 0;

    boolean shotState = true;

    AlienArmy alienArmy = null;
    
    /**
     *
     */
    public Shot(int xVal, int yVal, AlienArmy aa) {
        x = xVal;//Set the shot direction
	...
    }

    /**
     *
     */
    private boolean moveShot() {

	
	//Now we need to see if we've hit anything!
	...
            //We hit something!
            ...

        ...
	//We could have written this as
	//shotHeight -= 2;	
	
	//Now check we haven't gone off the screen
	...
    }

    /**
     * Draw the image of the shot
     */    
    public void drawShot(Graphics g) {
	...
    } 

    public boolean getShotState() {
        ...
    }

    public void run() {
        while(true) {
            try {
                Thread.sleep(shotSpeed);
            } catch(InterruptedException ie) {
                //Ignore this exception
            }

	    //Use this line for super bullets
	    //
	    //moveShot()
	    //
	    //or this for nomal bullets
	    //
	    //if (moveShot()) {
	    //    break;
	    //}
	    
	    if (moveShot()) {
                break;
	    }

	}
    }

    

}
