From 63397e2f5fc62c7d1fc2efbe8f4c686b2343e471 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Fri, 27 May 2011 17:54:44 +0200 Subject: Implemented redealing in RoundControl git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@287 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/RoundControl.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/jrummikub/control/RoundControl.java') 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(); + } } -- cgit v1.2.3