From d2df76cae49bf31b28d422b5ddfbfb5b1e7651d0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 22 Jun 2011 07:04:13 +0200 Subject: Withdraw games on start git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@580 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/network/ConnectionControl.java | 1 - src/jrummikub/control/network/GameOfferControl.java | 1 + src/jrummikub/control/network/NetworkControl.java | 2 +- src/jrummikub/control/network/NetworkGameControl.java | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jrummikub/control/network/ConnectionControl.java b/src/jrummikub/control/network/ConnectionControl.java index 2ae098b..7491938 100644 --- a/src/jrummikub/control/network/ConnectionControl.java +++ b/src/jrummikub/control/network/ConnectionControl.java @@ -272,7 +272,6 @@ public class ConnectionControl implements IConnectionControl { public void withdrawGame() { offeredGame = null; final UUID uuid = currentGame.getGameID(); - currentGame = null; run(new SendRunner() { @Override protected void addData(DefaultPacketExtension extension) { diff --git a/src/jrummikub/control/network/GameOfferControl.java b/src/jrummikub/control/network/GameOfferControl.java index b247a1c..a98f622 100644 --- a/src/jrummikub/control/network/GameOfferControl.java +++ b/src/jrummikub/control/network/GameOfferControl.java @@ -132,6 +132,7 @@ public class GameOfferControl extends AbstractGameBeginControl { private void startGame() { abort(); connectionControl.startGame(); + connectionControl.withdrawGame(); GameSettings settings = gameData.getGameSettings(); removeVacant(settings); diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java index 2b5f90f..cd0f66f 100644 --- a/src/jrummikub/control/network/NetworkControl.java +++ b/src/jrummikub/control/network/NetworkControl.java @@ -339,7 +339,7 @@ public class NetworkControl { @Override public void handle() { view.setBottomPanel(BottomPanelType.START_GAME_PANEL); - createSettingsControl(); + view.showGameListPanel(true); } }); diff --git a/src/jrummikub/control/network/NetworkGameControl.java b/src/jrummikub/control/network/NetworkGameControl.java index 262b380..009c131 100644 --- a/src/jrummikub/control/network/NetworkGameControl.java +++ b/src/jrummikub/control/network/NetworkGameControl.java @@ -106,7 +106,7 @@ public class NetworkGameControl extends GameControl { backEvent.emit(); } })); - connections.add(view.getQuitEvent().add(new IListener() { + connections.add(view.getEndProgramEvent().add(new IListener() { @Override public void handle() { System.exit(0); -- cgit v1.2.3