summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/turn
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control/turn')
-rw-r--r--src/jrummikub/control/turn/AIControl.java2
-rw-r--r--src/jrummikub/control/turn/AbstractTurnControl.java7
-rw-r--r--src/jrummikub/control/turn/HumanTurnControl.java2
-rw-r--r--src/jrummikub/control/turn/ITurnControl.java3
4 files changed, 9 insertions, 5 deletions
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<ITable> endOfTurnEvent = new Event1<ITable>();
+ protected Event3<IHand, ITable, ITable> endOfTurnEvent = new Event3<IHand, ITable, ITable>();
protected Event redealEvent = new Event();
protected Event1<ITable> tableUpdateEvent = new Event1<ITable>();
protected TurnInfo turnInfo;
@@ -30,7 +33,7 @@ public abstract class AbstractTurnControl implements ITurnControl {
private boolean started = false;
@Override
- public IEvent1<ITable> getEndOfTurnEvent() {
+ public IEvent3<IHand, ITable, ITable> 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<ITable> getEndOfTurnEvent();
+ public IEvent3<IHand, ITable, ITable> getEndOfTurnEvent();
/**
* Emitted when the round is aborted and needs to be restarted