From 9df549727672e8df768d46e3ef1fb0c7957f0f89 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 19 Jun 2011 23:19:01 +0200 Subject: Make NetworkRoundControl test work git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@496 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/turn/AbstractTurnControl.java | 6 +++++- src/jrummikub/control/turn/HumanTurnControl.java | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/jrummikub/control/turn') diff --git a/src/jrummikub/control/turn/AbstractTurnControl.java b/src/jrummikub/control/turn/AbstractTurnControl.java index f129f24..b687ca0 100644 --- a/src/jrummikub/control/turn/AbstractTurnControl.java +++ b/src/jrummikub/control/turn/AbstractTurnControl.java @@ -97,7 +97,11 @@ public abstract class AbstractTurnControl implements ITurnControl { } protected void cleanUp() { - timer.stopTimer(); + if (timer != null) { + timer.stopTimer(); + } + started = true; + for (Connection c : connections) { c.remove(); } diff --git a/src/jrummikub/control/turn/HumanTurnControl.java b/src/jrummikub/control/turn/HumanTurnControl.java index 51f77e4..7ca2731 100644 --- a/src/jrummikub/control/turn/HumanTurnControl.java +++ b/src/jrummikub/control/turn/HumanTurnControl.java @@ -90,7 +90,6 @@ public class HumanTurnControl extends AbstractTurnControl { connections.add(view.getPlayerPanel().getEndTurnEvent() .add(new IListener() { - @Override public void handle() { endOfTurn(false); -- cgit v1.2.3