diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-13 18:22:55 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-06-13 18:22:55 +0200 |
commit | 70d6ae6d749d11ced007fa781ce65c6e27229007 (patch) | |
tree | 67beb90aeafcc48130188cf54dfc8b8847b62db0 /src/jrummikub/model | |
parent | a4faa8db23589930a828250816ebaeddf787c689 (diff) | |
download | JRummikub-70d6ae6d749d11ced007fa781ce65c6e27229007.tar JRummikub-70d6ae6d749d11ced007fa781ce65c6e27229007.zip |
Player Type in player settings verschoben
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@420 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r-- | src/jrummikub/model/PlayerSettings.java | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/jrummikub/model/PlayerSettings.java b/src/jrummikub/model/PlayerSettings.java index 17e521c..afa610c 100644 --- a/src/jrummikub/model/PlayerSettings.java +++ b/src/jrummikub/model/PlayerSettings.java @@ -9,24 +9,34 @@ import jrummikub.control.turn.TurnControlFactory; * The settings of a player */ public class PlayerSettings implements Serializable { + /** + * Type of turn control. + */ + public enum Type { + /** */ + HUMAN, + /** */ + COMPUTER + } + private static final long serialVersionUID = 1963640115089275992L; private String name; private Color color; - private TurnControlFactory.Type turnControlType; + private Type turnControlType; /** * Create a new human player * * @param name - * the player's name + * the player's name * @param color - * the player's color + * the player's color */ public PlayerSettings(String name, Color color) { this.name = name; this.color = color; - this.turnControlType = TurnControlFactory.Type.HUMAN; + this.turnControlType = Type.HUMAN; } /** @@ -51,7 +61,7 @@ public class PlayerSettings implements Serializable { * Sets the player's color * * @param color - * the new color + * the new color */ public void setColor(Color color) { this.color = color; @@ -61,7 +71,7 @@ public class PlayerSettings implements Serializable { * Sets the player's name * * @param name - * the new name + * the new name */ public void setName(String name) { this.name = name; @@ -71,9 +81,9 @@ public class PlayerSettings implements Serializable { * Set the player's TurnControlFactory type * * @param turnControlType - * player's TurnControlFactory type + * player's TurnControlFactory type */ - public void setTurnControlType(TurnControlFactory.Type turnControlType) { + public void setTurnControlType(Type turnControlType) { this.turnControlType = turnControlType; } @@ -82,7 +92,7 @@ public class PlayerSettings implements Serializable { * * @return player's TurnControlFactory type */ - public TurnControlFactory.Type getTurnControlType() { + public Type getTurnControlType() { return turnControlType; } } |