From 3b49b2053e9f9d26b73db0ffc8380a60706ee095 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 10 May 2011 03:54:48 +0200 Subject: Added all missing comments git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@213 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/TurnControl.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/jrummikub/control/TurnControl.java') diff --git a/src/jrummikub/control/TurnControl.java b/src/jrummikub/control/TurnControl.java index 32e6379..ace201e 100644 --- a/src/jrummikub/control/TurnControl.java +++ b/src/jrummikub/control/TurnControl.java @@ -21,6 +21,9 @@ import jrummikub.util.IListener2; import jrummikub.util.Pair; import jrummikub.view.IView; +/** + * Controller for a single turn made by a human player + */ public class TurnControl { private IHand hand; private ITable table; @@ -32,6 +35,17 @@ public class TurnControl { private Event endOfTurnEvent = new Event(); private List connections = new ArrayList(); + /** + * Create a new TurnControl using a given hand (of the active player), a + * given table and a given view for user interaction. + * + * @param hand + * active player's hand + * @param table + * current table + * @param view + * view for user interaction. + */ public TurnControl(IHand hand, ITable table, IView view) { this.hand = hand; this.table = table; @@ -47,6 +61,9 @@ public class TurnControl { this.timer = testTimer; } + /** + * Start the turn + */ public void startTurn() { IListener endOfTurnListener = new IListener() { @@ -408,6 +425,11 @@ public class TurnControl { view.setSelectedStones(new ArrayList()); } + /** + * Get the event that is emitted when the turn is over + * + * @return end of turn event + */ public IEvent getEndOfTurnEvent() { return endOfTurnEvent; } -- cgit v1.2.3