import java.awt.*;

public class Missile extends Sprite {

    public Missile(Image image, int x, int y, int w, int h, int dx, int dy)
    {
        super(x, y, w, h, dx, dy, image);
    }

    public boolean intersect(Ship ship)
    {
        Rectangle r1 = new Rectangle(x, y, width, height);
        Rectangle r2 = new Rectangle(ship.getX(), ship.getY(), ship.getWidth(), ship.getHeight());

        return r1.intersects(r2);
    }
}
