summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/ApplicationControl.java
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-07 21:51:20 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-07 21:51:20 +0200
commit8b763a817b21aff45d704940ad2e17799dc7bb43 (patch)
treedc797106eff544419b3be18df01e7335f3a1ffb0 /src/jrummikub/control/ApplicationControl.java
parent244abb7e7320355d0c4aad4a7ba267f11d358563 (diff)
downloadJRummikub-8b763a817b21aff45d704940ad2e17799dc7bb43.tar
JRummikub-8b763a817b21aff45d704940ad2e17799dc7bb43.zip
Saving is working
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@382 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/ApplicationControl.java')
-rw-r--r--src/jrummikub/control/ApplicationControl.java9
1 files changed, 6 insertions, 3 deletions
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<GameSettings>() {
+ settingsControl.getStartGameEvent().add(new IListener1<GameSettings>() {
@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();
}
-
}