summaryrefslogtreecommitdiffstats
path: root/src/jrummikub
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-27 17:54:44 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-27 17:54:44 +0200
commit63397e2f5fc62c7d1fc2efbe8f4c686b2343e471 (patch)
tree6dfbc851d4503638129756efb5ec4b438c1c85cb /src/jrummikub
parentf7743efa7ddf473a9ee24bfe7b69e0ccccdeacd5 (diff)
downloadJRummikub-63397e2f5fc62c7d1fc2efbe8f4c686b2343e471.tar
JRummikub-63397e2f5fc62c7d1fc2efbe8f4c686b2343e471.zip
Implemented redealing in RoundControl
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@287 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub')
-rw-r--r--src/jrummikub/control/RoundControl.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/jrummikub/control/RoundControl.java b/src/jrummikub/control/RoundControl.java
index c1997bb..e9e9453 100644
--- a/src/jrummikub/control/RoundControl.java
+++ b/src/jrummikub/control/RoundControl.java
@@ -64,12 +64,18 @@ public class RoundControl {
deal();
connections.add(view.getStartTurnEvent().add(new IListener() {
-
@Override
public void handle() {
startTurn();
}
}));
+
+ connections.add(view.getPlayerPanel().getRedealEvent().add(new IListener() {
+ @Override
+ public void handle() {
+ redeal();
+ }
+ }));
prepareTurn();
}
@@ -314,4 +320,11 @@ public class RoundControl {
public IEvent getRestartRoundEvent() {
return restartRoundEvent;
}
+
+ private void redeal() {
+ for (Connection c : connections) {
+ c.remove();
+ }
+ restartRoundEvent.emit();
+ }
}