public class Player
extends java.lang.Object
implements java.io.Serializable
A player of WWWordz, including authentication data (name and password), current round and accumulated points.
Modifier and Type | Field and Description |
---|---|
(package private) int |
accumulated |
(package private) java.lang.String |
nick |
(package private) java.lang.String |
password |
(package private) int |
points |
Constructor and Description |
---|
Player(java.lang.String nick,
java.lang.String password)
Creates a player from nick and password
|
Modifier and Type | Method and Description |
---|---|
int |
getAccumulated()
Current accumulated points of this player
|
java.lang.String |
getNick()
Current nick of this player
|
java.lang.String |
getPassword()
Current password of this player
|
int |
getPoints()
Current points of this player
|
void |
setAccumulated(int accumulated)
Update accumulated points of this player
|
void |
setNick(java.lang.String nick)
Update nick of this player
|
void |
setPassword(java.lang.String password)
Update password of this player
|
void |
setPoints(int points)
Update points of current round for this player
These points are added to accumulated points
|
java.lang.String nick
java.lang.String password
int points
int accumulated
public Player(java.lang.String nick, java.lang.String password)
nick
- of playerpassword
- of playerpublic java.lang.String getNick()
public void setNick(java.lang.String nick)
nick
- of playerpublic java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- of playerpublic int getPoints()
public void setPoints(int points)
points
- of playerpublic int getAccumulated()
public void setAccumulated(int accumulated)
accumulated
- points