public static void main(String[] args) { MyView view = new MyView(); MyModel model = new MyModel(); Presenter presenter = new Presenter(model, view); model.addObserver(presenter); view.addObserver(presenter); view.start(); }
public static void main(String[] args) { MyModel m = new MyModel(); MyView v = new MyView(); MazeClientHandler ch = new MazeClientHandler(); ServerWindow sw = new ServerWindow(235, 80, "Maze Server"); Presenter p = new Presenter(m, v, ch, sw); m.addObserver(p); v.addObserver(p); ch.addObserver(p); sw.addObserver(p); sw.run(); }