summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/PlayerSettings.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/jrummikub/model/PlayerSettings.java b/src/jrummikub/model/PlayerSettings.java
index 217b1fc..cc1c6e4 100644
--- a/src/jrummikub/model/PlayerSettings.java
+++ b/src/jrummikub/model/PlayerSettings.java
@@ -2,7 +2,6 @@ package jrummikub.model;
import java.awt.Color;
-import jrummikub.control.turn.HumanTurnControl;
import jrummikub.control.turn.TurnControlFactory;
/**
@@ -11,7 +10,7 @@ import jrummikub.control.turn.TurnControlFactory;
public class PlayerSettings {
private String name;
private Color color;
- private TurnControlFactory turnControlFactory;
+ private TurnControlFactory.Type turnControlType;
/**
* Create a new player
@@ -27,9 +26,9 @@ public class PlayerSettings {
TurnControlFactory turnControlFactory) {
this.name = name;
this.color = color;
- this.turnControlFactory = turnControlFactory;
+ this.turnControlType = TurnControlFactory.Type.HUMAN;
}
-
+
/**
* Create a new human player
*
@@ -41,7 +40,7 @@ public class PlayerSettings {
public PlayerSettings(String name, Color color) {
this.name = name;
this.color = color;
- this.turnControlFactory = HumanTurnControl.getFactory();
+ this.turnControlType = TurnControlFactory.Type.HUMAN;
}
/**
@@ -83,21 +82,21 @@ public class PlayerSettings {
}
/**
- * Set the player's TurnControlFactory
+ * Set the player's TurnControlFactory type
*
- * @param turnControlFactory
- * player's TurnControlFactory
+ * @param turnControlType
+ * player's TurnControlFactory type
*/
- public void setTurnControlFactory(TurnControlFactory turnControlFactory) {
- this.turnControlFactory = turnControlFactory;
+ public void setTurnControlType(TurnControlFactory.Type turnControlType) {
+ this.turnControlType = turnControlType;
}
/**
- * Get the player's TurnControlFactory
+ * Get the player's TurnControlFactory type
*
- * @return player's TurnControlFactory
+ * @return player's TurnControlFactory type
*/
- public TurnControlFactory getTurnControlFactory() {
- return turnControlFactory;
+ public TurnControlFactory.Type getTurnControlType() {
+ return turnControlType;
}
}