Player Type in player settings verschoben

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@420 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Ida Massow 2011-06-13 18:22:55 +02:00
parent a4faa8db23
commit 70d6ae6d74
9 changed files with 132 additions and 115 deletions

View file

@ -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;
}
}