summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-29 21:49:03 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-29 21:49:03 +0200
commit43ace4c18a5aeb0d466ff9180614ba07dc207f33 (patch)
tree9a6497b0ae1c6036dc8abf44cbad96bd352ac480 /src/jrummikub/model
parent08e9b28f3b679a8f511ca40f5b8b6aa5ec8aa188 (diff)
downloadJRummikub-43ace4c18a5aeb0d466ff9180614ba07dc207f33.tar
JRummikub-43ace4c18a5aeb0d466ff9180614ba07dc207f33.zip
Added player type selection to the settings panel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@315 72836036-5685-4462-b002-a69064685172
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;
}
}