summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control/network
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-21 19:16:16 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-21 19:16:16 +0200
commit5d0d5932971c456b85b142f9e483f0226dfefc2b (patch)
tree809b9b02de61fc92f8abd54b1651765f4d6b2547 /src/jrummikub/control/network
parentd09041304bee53b86c3ddd098a6ff39db85889f3 (diff)
downloadJRummikub-5d0d5932971c456b85b142f9e483f0226dfefc2b.tar
JRummikub-5d0d5932971c456b85b142f9e483f0226dfefc2b.zip
Make starting new rounds on network mode work
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@553 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/control/network')
-rw-r--r--src/jrummikub/control/network/NetworkGameControl.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/jrummikub/control/network/NetworkGameControl.java b/src/jrummikub/control/network/NetworkGameControl.java
index 1040909..9451876 100644
--- a/src/jrummikub/control/network/NetworkGameControl.java
+++ b/src/jrummikub/control/network/NetworkGameControl.java
@@ -7,6 +7,7 @@ import jrummikub.model.GameSettings;
import jrummikub.model.IRoundState;
import jrummikub.util.IListener;
import jrummikub.view.IView;
+import jrummikub.view.IView.BottomPanelType;
public class NetworkGameControl extends GameControl {
private IConnectionControl connectionControl;
@@ -21,11 +22,11 @@ public class NetworkGameControl extends GameControl {
}
@Override
- public void startGame() {
+ protected void startRound() {
connections.add(connectionControl.getRoundStartEvent().add(new IListener() {
@Override
public void handle() {
- startRound();
+ NetworkGameControl.super.startRound();
}
}));
@@ -43,4 +44,10 @@ public class NetworkGameControl extends GameControl {
protected RoundControl createRoundControl(IRoundState roundState) {
return new NetworkRoundControl(roundState, view, connectionControl, host);
}
+
+ @Override
+ protected void showWinPanel() {
+ view.setBottomPanel(host ? BottomPanelType.WIN_PANEL
+ : BottomPanelType.NETWORK_WIN_PANEL);
+ }
}