From f1ecdcbe59cfaaad647cb5a6c50ceb39c9496c8d Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Mon, 4 Jul 2011 22:26:29 +0200 Subject: More network tests git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@604 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/GameControl.java | 2 +- src/jrummikub/control/network/NetworkControl.java | 8 -------- src/jrummikub/control/network/NetworkGameControl.java | 15 +-------------- 3 files changed, 2 insertions(+), 23 deletions(-) (limited to 'src/jrummikub') 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 connections = new ArrayList(); - 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() { -- cgit v1.2.3