From 0c3eb9a28363ae697f984d9413eb187bfe2511a9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 20 Jun 2011 06:41:15 +0200 Subject: Fixed a bunch of network synchronization bugs git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@510 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/turn/AIControl.java | 2 +- src/jrummikub/control/turn/AbstractTurnControl.java | 7 +++++-- src/jrummikub/control/turn/HumanTurnControl.java | 2 +- src/jrummikub/control/turn/ITurnControl.java | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'src/jrummikub/control/turn') diff --git a/src/jrummikub/control/turn/AIControl.java b/src/jrummikub/control/turn/AIControl.java index 8bcf661..b633f96 100644 --- a/src/jrummikub/control/turn/AIControl.java +++ b/src/jrummikub/control/turn/AIControl.java @@ -225,7 +225,7 @@ public class AIControl extends AbstractTurnControl { return; } cleanUp(); - endOfTurnEvent.emit(turnInfo.getTable()); + endOfTurnEvent.emit(null, null, turnInfo.getTable()); } /** diff --git a/src/jrummikub/control/turn/AbstractTurnControl.java b/src/jrummikub/control/turn/AbstractTurnControl.java index b687ca0..8b481bc 100644 --- a/src/jrummikub/control/turn/AbstractTurnControl.java +++ b/src/jrummikub/control/turn/AbstractTurnControl.java @@ -6,12 +6,15 @@ import java.util.List; import jrummikub.control.ITurnTimer; import jrummikub.control.TurnTimer; import jrummikub.model.GameSettings; +import jrummikub.model.IHand; import jrummikub.model.ITable; import jrummikub.util.Connection; import jrummikub.util.Event; import jrummikub.util.Event1; +import jrummikub.util.Event3; import jrummikub.util.IEvent; import jrummikub.util.IEvent1; +import jrummikub.util.IEvent3; import jrummikub.util.IListener; import jrummikub.view.IView; @@ -19,7 +22,7 @@ import jrummikub.view.IView; * Abstract base class for TurnControls */ public abstract class AbstractTurnControl implements ITurnControl { - protected Event1 endOfTurnEvent = new Event1(); + protected Event3 endOfTurnEvent = new Event3(); protected Event redealEvent = new Event(); protected Event1 tableUpdateEvent = new Event1(); protected TurnInfo turnInfo; @@ -30,7 +33,7 @@ public abstract class AbstractTurnControl implements ITurnControl { private boolean started = false; @Override - public IEvent1 getEndOfTurnEvent() { + public IEvent3 getEndOfTurnEvent() { return endOfTurnEvent; } diff --git a/src/jrummikub/control/turn/HumanTurnControl.java b/src/jrummikub/control/turn/HumanTurnControl.java index 7ca2731..e43ec5b 100644 --- a/src/jrummikub/control/turn/HumanTurnControl.java +++ b/src/jrummikub/control/turn/HumanTurnControl.java @@ -448,7 +448,7 @@ public class HumanTurnControl extends AbstractTurnControl { if (redeal) { redealEvent.emit(); } else { - endOfTurnEvent.emit(turnInfo.getTable()); + endOfTurnEvent.emit(null, null, turnInfo.getTable()); } } diff --git a/src/jrummikub/control/turn/ITurnControl.java b/src/jrummikub/control/turn/ITurnControl.java index 66bd065..5c91c0c 100644 --- a/src/jrummikub/control/turn/ITurnControl.java +++ b/src/jrummikub/control/turn/ITurnControl.java @@ -5,6 +5,7 @@ import jrummikub.model.IHand; import jrummikub.model.ITable; import jrummikub.util.IEvent; import jrummikub.util.IEvent1; +import jrummikub.util.IEvent3; import jrummikub.view.IView; /** @@ -30,7 +31,7 @@ public interface ITurnControl { * * @return end of turn event */ - public IEvent1 getEndOfTurnEvent(); + public IEvent3 getEndOfTurnEvent(); /** * Emitted when the round is aborted and needs to be restarted -- cgit v1.2.3