summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/RoundControl.java
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-21 03:52:25 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-21 03:52:25 +0200
commitb62babba458c703c4a7597bf4640a936227d734a (patch)
treea79c02c42ea33a9f3e5f46781fadb04c67e60d1a /src/jrummikub/control/RoundControl.java
parent9b5f3648eda004f85c020fc7989c12557d08489a (diff)
downloadJRummikub-b62babba458c703c4a7597bf4640a936227d734a.tar
JRummikub-b62babba458c703c4a7597bf4640a936227d734a.zip
Disable pause function in network mode
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@536 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/RoundControl.java')
-rw-r--r--src/jrummikub/control/RoundControl.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index 71980e1..62a57cf 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -76,6 +76,11 @@ public class RoundControl {
private Event1<Score> endOfRoundEvent = new Event1<Score>();
protected List<Connection> connections = new ArrayList<Connection>();
private boolean roundFinished;
+ private boolean mayPause;
+
+ public RoundControl(IRoundState roundState, IView view) {
+ this(roundState, view, true);
+ }
/**
* Create a new RoundControl using the given gameState and view
@@ -85,9 +90,10 @@ public class RoundControl {
* @param view
* view used for user interaction
*/
- public RoundControl(IRoundState roundState, IView view) {
+ protected RoundControl(IRoundState roundState, IView view, boolean mayPause) {
this.roundState = roundState;
this.view = view;
+ this.mayPause = mayPause;
}
/**
@@ -221,7 +227,8 @@ public class RoundControl {
view.getPlayerPanel().setEndTurnMode(turnMode);
}
- turnControl.setup(new ITurnControl.TurnInfo(roundState, turnMode),
+ turnControl.setup(
+ new ITurnControl.TurnInfo(roundState, turnMode, mayPause),
roundState.getGameSettings(), view);
turnControl.getEndOfTurnEvent().add(
new IListener2<IRoundState, InvalidTurnInfo>() {