From 70d6ae6d749d11ced007fa781ce65c6e27229007 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Mon, 13 Jun 2011 18:22:55 +0200 Subject: Player Type in player settings verschoben git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@420 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/PlayerSettings.java | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'src/jrummikub/model') 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; } } -- cgit v1.2.3