public class ConnectedPerson
extends java.lang.Object
| Constructor and Description |
|---|
ConnectedPerson(java.lang.String name)
constructs the LoginName
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCode() |
java.lang.String |
getName() |
GameMode |
getRole() |
java.lang.String |
getWarriorName() |
void |
setCode(java.lang.String code)
it keeps the code saved for every single person
|
void |
setName(java.lang.String name)
setup a new LoginName
|
void |
setRole(GameMode role)
setup The status of the player is it a player or a visitor
|
void |
setWarriorName(java.lang.String name)
if you wish, you can also keep the meta warrioname for every player the
warriorname is something like "imp"
|
public ConnectedPerson(java.lang.String name)
name - the name should contain an id for the class it has to be the
login name of the person and the same name should not be used
in two different ConnectedPerson classes you have to
initialize the class with an LoginName because you identify
the person with its namepublic void setName(java.lang.String name)
name - has to be the LoginName of the clientpublic void setRole(GameMode role)
role - has to be the role of the connected clientpublic void setCode(java.lang.String code)
code - has to be the code of the connected clientpublic void setWarriorName(java.lang.String name)
name - has to be the warrior name of the connected clientpublic java.lang.String getName()
public GameMode getRole()
public java.lang.String getCode()
public java.lang.String getWarriorName()