diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jrummikub/control/ApplicationControl.java | 13 | ||||
-rw-r--r-- | src/jrummikub/control/network/NetworkControl.java | 7 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/jrummikub/control/ApplicationControl.java b/src/jrummikub/control/ApplicationControl.java index 0e62ed9..18d3ba9 100644 --- a/src/jrummikub/control/ApplicationControl.java +++ b/src/jrummikub/control/ApplicationControl.java @@ -32,7 +32,7 @@ public class ApplicationControl { * Creates a new application control * * @param view - * the view to use + * the view to use */ public ApplicationControl(final IView view) { this.view = view; @@ -101,11 +101,10 @@ public class ApplicationControl { saveControl.getLoadEvent().add( new IListener3<GameSettings, GameState, IRoundState>() { @Override - public void handle(GameSettings settings, - GameState gameState, IRoundState roundState) { + public void handle(GameSettings settings, GameState gameState, + IRoundState roundState) { abortControls(); - gameControl = new GameControl(settings, saveControl, - view); + gameControl = new GameControl(settings, saveControl, view); addGameControlListeners(gameControl); gameControl.continueGame(gameState, roundState); } @@ -155,6 +154,10 @@ public class ApplicationControl { networkControl.abort(); networkControl = null; } + + view.showSidePanel(false); + view.showScorePanel(false); + view.setBottomPanel(BottomPanelType.START_GAME_PANEL); } /** diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java index 4c03923..88f347c 100644 --- a/src/jrummikub/control/network/NetworkControl.java +++ b/src/jrummikub/control/network/NetworkControl.java @@ -240,12 +240,19 @@ public class NetworkControl { if (settingsControl != null) { settingsControl.abort(); + settingsControl = null; } if (gameOfferControl != null) { gameOfferControl.abort(); + gameOfferControl = null; } if (gameJoinControl != null) { gameJoinControl.abort(); + gameJoinControl = null; + } + if (gameControl != null) { + gameControl.abortGame(); + gameControl = null; } connectionControl.disconnect(); |