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

/**
 * 
 */
public class WaveRunner extends WindowController {
    
    private static double START = 10;

    private WaveInterface wave;
    
    public void begin() {
        wave = new EmptyWave(new Location(START, canvas.getHeight()/2));
        while (wave.getLocation().getX()< canvas.getWidth()-2*START) {
            Location l = new Location(wave.getLocation().getX()+wave.getWidth(),
                                      wave.getLocation().getY());
            wave = new Wave(l, canvas, wave);
        }
    }
        
    public void onMouseClick(Location pt) {
        new BounceController(wave);
    }

}
