diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-08 17:46:44 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-08 17:46:44 +0200 |
commit | 70af06e1bff47a36de9d9106412388b2f5b91f15 (patch) | |
tree | e4c8bd5301210d0a9e1ca12f3343c5e7d8316a4d /src/jrummikub/control/ApplicationControl.java | |
parent | 41fe3c93b3f0c880ce550fda4cd6ad6f30d3e99c (diff) | |
download | JRummikub-70af06e1bff47a36de9d9106412388b2f5b91f15.tar JRummikub-70af06e1bff47a36de9d9106412388b2f5b91f15.zip |
LAden und Speichern geht jetzt immer sauber
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@388 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/ApplicationControl.java')
-rw-r--r-- | src/jrummikub/control/ApplicationControl.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jrummikub/control/ApplicationControl.java b/src/jrummikub/control/ApplicationControl.java index 068b898..e4ddb55 100644 --- a/src/jrummikub/control/ApplicationControl.java +++ b/src/jrummikub/control/ApplicationControl.java @@ -16,6 +16,7 @@ import jrummikub.view.IView.BottomPanelType; public class ApplicationControl { private SaveControl saveControl; private IView view; + private GameControl gameControl; /** * Creates a new application control @@ -53,8 +54,10 @@ public class ApplicationControl { public void handle(GameSettings settings, GameState gameState, IRoundState roundState) { settingsControl.abort(); - // TODO alles ordentlich beenden (controls) - GameControl gameControl = new GameControl(settings, + if (gameControl != null){ + gameControl.abortGame(); + } + gameControl = new GameControl(settings, saveControl, view); addGameControlListeners(gameControl); gameControl.continueGame(gameState, roundState); @@ -67,7 +70,7 @@ public class ApplicationControl { public void handle(GameSettings settings) { saveControl.setGameSettings(settings); - GameControl gameControl = new GameControl(settings, + gameControl = new GameControl(settings, saveControl, view); addGameControlListeners(gameControl); |