diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-07-04 22:26:29 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-07-04 22:26:29 +0200 |
commit | f1ecdcbe59cfaaad647cb5a6c50ceb39c9496c8d (patch) | |
tree | 8ed56faebc6194bb92c620916bed8c19dc15a521 /src | |
parent | ce6cc738adb3c923b3e993adf5c338327df6ecf2 (diff) | |
download | JRummikub-f1ecdcbe59cfaaad647cb5a6c50ceb39c9496c8d.tar JRummikub-f1ecdcbe59cfaaad647cb5a6c50ceb39c9496c8d.zip |
More network tests
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@604 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src')
-rw-r--r-- | src/jrummikub/control/GameControl.java | 2 | ||||
-rw-r--r-- | src/jrummikub/control/network/NetworkControl.java | 8 | ||||
-rw-r--r-- | src/jrummikub/control/network/NetworkGameControl.java | 15 |
3 files changed, 2 insertions, 23 deletions
diff --git a/src/jrummikub/control/GameControl.java b/src/jrummikub/control/GameControl.java index 48c1b85..8209a27 100644 --- a/src/jrummikub/control/GameControl.java +++ b/src/jrummikub/control/GameControl.java @@ -30,7 +30,7 @@ public class GameControl { protected GameState gameState; protected List<Connection> connections = new ArrayList<Connection>(); - private Event endOfGameEvent = new Event(); + protected Event endOfGameEvent = new Event(); /** * Constructor diff --git a/src/jrummikub/control/network/NetworkControl.java b/src/jrummikub/control/network/NetworkControl.java index bf92ab5..92837bd 100644 --- a/src/jrummikub/control/network/NetworkControl.java +++ b/src/jrummikub/control/network/NetworkControl.java @@ -362,14 +362,6 @@ public class NetworkControl { private void createGameControl(GameSettings settings, boolean host) { gameControl = new NetworkGameControl(settings, saveControl, view, connectionControl, host); - gameControl.getBackEvent().add(new IListener() { - @Override - public void handle() { - view.setBottomPanel(BottomPanelType.START_GAME_PANEL); - abortControls(); - view.showGameListPanel(true); - } - }); gameControl.getEndOfGameEvent().add(new IListener() { @Override public void handle() { diff --git a/src/jrummikub/control/network/NetworkGameControl.java b/src/jrummikub/control/network/NetworkGameControl.java index a277cd3..90dd1b3 100644 --- a/src/jrummikub/control/network/NetworkGameControl.java +++ b/src/jrummikub/control/network/NetworkGameControl.java @@ -7,8 +7,6 @@ import jrummikub.model.GameSettings; import jrummikub.model.IRoundState; import jrummikub.model.PlayerSettings; import jrummikub.model.PlayerSettings.Type; -import jrummikub.util.Event; -import jrummikub.util.IEvent; import jrummikub.util.IListener; import jrummikub.util.IListener1; import jrummikub.view.IView; @@ -20,7 +18,6 @@ import jrummikub.view.IView.BottomPanelType; public class NetworkGameControl extends GameControl { private IConnectionControl connectionControl; private boolean host; - private Event backEvent = new Event(); /** * Creates new network game control @@ -62,16 +59,6 @@ public class NetworkGameControl extends GameControl { })); } - /** - * The back event is emitted when the network game has ended and the player - * wants to return to the game list - * - * @return the event - */ - public IEvent getBackEvent() { - return backEvent; - } - @Override protected void startRound() { connections.add(connectionControl.getRoundStartEvent().add(new IListener() { @@ -109,7 +96,7 @@ public class NetworkGameControl extends GameControl { @Override public void handle() { abortGame(); - backEvent.emit(); + endOfGameEvent.emit(); } })); connections.add(view.getEndProgramEvent().add(new IListener() { |