package spacefront;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.geom.Ellipse2D;
import java.util.Set;

public class Shot extends SpaceObject {

    private static final double SIZE = 8;
    private static final Shape SHAPE
        = new Ellipse2D.Double(-SIZE / 2, -SIZE / 2, SIZE, SIZE);

    private static final long serialVersionUID = 1L;

    private static final double SPEED = 8;

    public Shot(double destx, double desty) {
        super(0, 0, 0);
        double a = Math.atan2(desty, destx);
        setSpeed(Math.cos(a) * SPEED, Math.sin(a) * SPEED, 0);
        setShape(SHAPE);
    }

    public Meteoroid step(Set<Meteoroid> targets) {
        super.step();
        for (Meteoroid m : targets) {
            if (m.get().contains(getX(), getY())) {
                return m;
            }
        }
        return null;
    }

    public void paint(Graphics2D g) {
        g.setColor(Color.RED);
        g.fill(get());
    }
}

@@ -251,36 +251,159 @@
 nal 
-double SIZE = 8;%0A    private
+long serialVersionUID = 1L;%0A%0A    /* Appearance */%0A    private static final double SIZE = 8;%0A    public static final Color COLOR = Color.RED;%0A    public
  sta
@@ -423,24 +423,26 @@
 pe SHAPE
+ =
 %0A       
  = new E
@@ -433,18 +433,16 @@
 %0A       
- =
  new Ell
@@ -490,17 +490,16 @@
  SIZE);%0A
-%0A
     priv
@@ -519,36 +519,112 @@
 nal 
-long serialVersionUID = 1L;%0A
+double OSCILLATION_RATE = 32;%0A    private static final double OSCILLATION_SCALE = 3;%0A%0A    /* Behavior */
 %0A   
@@ -1178,38 +1178,314 @@
 or(C
-olor.RED);%0A        g.fill(get(
+OLOR);%0A        Shape self = get();%0A        long time = System.currentTimeMillis();%0A        double scale = Math.sin(time / OSCILLATION_RATE) /%0A            OSCILLATION_SCALE + 1d;%0A        AffineTransform at = getTransform();%0A        at.scale(scale, scale);%0A        g.fill(at.createTransformedShape(getShape()
 ));%0A

Make the shots a little more interesting.