
import objectdraw.*;
import java.awt.*;

/**
 * Write a description of BounceController here.
 * 
 * YOUR NAME
 * DATE
 */
public class BounceController extends ActiveObject {
    
    private final static double DELAY = 40;
    private WaveInterface w;
    
    public BounceController(WaveInterface w) {
        this.w = w;    
        this.start();
    }

    public void run() {
        while (!w.isEmpty()) {
            new Bouncer(w.getFirst());
            w = w.getRest();
            pause(DELAY);
        }
    }
}
