package edu.stuy.starlorn.entities;

public class Bullet extends Entity {

    protected int speed;
    protected boolean firedByPlayer;

    public Bullet(double angle, int speed, String sprite) {
        super(sprite);
        this.angle = angle;
        this.speed = speed;
        firedByPlayer = false;
    }

    @Override
    public void step() {
        setXvel(speed * Math.cos(-angle));
        setYvel(speed * Math.sin(-angle));
        super.step();
        if (!onScreen())
            kill();

        for (Ship that : world.getShips()) {
            if (that.isHit(this)) {
                this.kill();
                that.kill();
                Explosion e = new Explosion();
                double thatcx = that.getRect().x + that.getRect().width / 2,
                       thatcy = that.getRect().y + that.getRect().height / 2;
                e.getRect().x = thatcx - e.getRect().width;
                e.getRect().y = thatcy - e.getRect().height;
                world.addEntity(e);
            }
        }
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getSpeed() {
        return speed;
    }

    public void setFiredByPlayer(boolean value) {
        firedByPlayer = value;
    }

    public boolean wasFiredByPlayer() {
        return firedByPlayer;
    }
}

@@ -129,16 +129,49 @@
 yPlayer;
+%0A    protected boolean isSeeking;
 %0A%0A    pu
@@ -334,16 +334,129 @@
  false;%0A
+        isSeeking = false;%0A        setXvel(speed * Math.cos(-angle));%0A        setYvel(speed * Math.sin(-angle));%0A
     %7D%0A%0A 
@@ -489,24 +489,52 @@
 id step() %7B%0A
+        if (isSeeking)%7B%0A    
         setX
@@ -564,32 +564,36 @@
 ngle));%0A        
+    
 setYvel(speed * 
@@ -603,32 +603,42 @@
 h.sin(-angle));%0A
+        %7D%0A
         super.st
@@ -1340,32 +1340,176 @@
 n speed;%0A    %7D%0A%0A
+    public void setSeeking(boolean seek) %7B%0A        this.isSeeking = seek;%0A    %7D%0A%0A    public int getSeeking() %7B%0A        return isSeeking;%0A    %7D%0A%0A
     public void 

Update Bullet.java