summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/control
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/control')
-rw-r--r--src/jrummikub/control/turn/ITurnControl.java17
-rw-r--r--src/jrummikub/control/turn/TurnControlFactory.java8
2 files changed, 19 insertions, 6 deletions
diff --git a/src/jrummikub/control/turn/ITurnControl.java b/src/jrummikub/control/turn/ITurnControl.java
index decd718..4616070 100644
--- a/src/jrummikub/control/turn/ITurnControl.java
+++ b/src/jrummikub/control/turn/ITurnControl.java
@@ -7,22 +7,27 @@ import jrummikub.util.Event;
import jrummikub.util.IEvent;
import jrummikub.view.IView;
+/**
+ * Interface containing shared methods of human and computer turn control
+ *
+ */
+// TODO zu viele parameter
public interface ITurnControl {
/**
* Start the turn
*
* @param settings
- * the game settings
+ * the game settings
* @param player
- * the active player
+ * the active player
* @param table
- * current table
+ * current table
* @param view
- * view for user interaction.
+ * view for user interaction.
* @param inspectOnly
- * the current turn doesn't allow any table manipulation
+ * the current turn doesn't allow any table manipulation
* @param mayRedeal
- * true when the current player may decide to redeal
+ * true when the current player may decide to redeal
*/
public void setup(GameSettings settings, IPlayer player, ITable table,
IView view, boolean inspectOnly, boolean mayRedeal);
diff --git a/src/jrummikub/control/turn/TurnControlFactory.java b/src/jrummikub/control/turn/TurnControlFactory.java
index 9e3b9f9..4474763 100644
--- a/src/jrummikub/control/turn/TurnControlFactory.java
+++ b/src/jrummikub/control/turn/TurnControlFactory.java
@@ -16,8 +16,16 @@ public abstract class TurnControlFactory {
COMPUTER
};
+
public abstract ITurnControl create();
+ /**
+ * returns the turn control factory for the specified type
+ *
+ * @param type
+ * Human or Computer
+ * @return TurnControlFactory for the player kind
+ */
static public TurnControlFactory getFactory(Type type) {
switch (type) {
case HUMAN: