From 8b763a817b21aff45d704940ad2e17799dc7bb43 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 7 Jun 2011 21:51:20 +0200 Subject: Saving is working git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@382 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/ApplicationControl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/jrummikub/control/ApplicationControl.java') diff --git a/src/jrummikub/control/ApplicationControl.java b/src/jrummikub/control/ApplicationControl.java index 0f73310..a0bdf35 100644 --- a/src/jrummikub/control/ApplicationControl.java +++ b/src/jrummikub/control/ApplicationControl.java @@ -11,6 +11,7 @@ import jrummikub.view.IView.BottomPanelType; * game control */ public class ApplicationControl { + private SaveControl saveControl; private IView view; /** @@ -21,6 +22,7 @@ public class ApplicationControl { */ public ApplicationControl(IView view) { this.view = view; + saveControl = new SaveControl(view); view.getMenuQuitEvent().add(new IListener() { @Override @@ -38,11 +40,13 @@ public class ApplicationControl { view.setBottomPanel(BottomPanelType.START_GAME_PANEL); SettingsControl settingsControl = new SettingsControl(view, new GameSettings()); - settingsControl.getStartGameEvent().add(new IListener1() { + settingsControl.getStartGameEvent().add(new IListener1() { @Override public void handle(GameSettings settings) { - GameControl gameControl = new GameControl(settings, view); + saveControl.setGameSettings(settings); + + GameControl gameControl = new GameControl(settings, saveControl, view); gameControl.getEndOfGameEvent().add(new IListener() { @Override public void handle() { @@ -55,5 +59,4 @@ public class ApplicationControl { }); settingsControl.startSettings(); } - } -- cgit v1.2.3