|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPlayerProfile
public class PlayerProfile
Class used to store player game data. This data consists of a User Name, a Password, wins/ties/losses record. This class can and should be extended so that a user can add specific details to the profile for certain games (chess/checkers/othello/etc.) This class does not take care of logging in or out, that is done by the server. This simply stores profile information.
| Constructor Summary | |
|---|---|
PlayerProfile(java.lang.String initName,
java.lang.String initPass)
Constructor to initialize the name and the password of a player. |
|
| Method Summary | |
|---|---|
void |
changePass(java.lang.String newPass)
Change the password of the current player. |
PlayerProfile |
clone()
|
int |
getLosses()
|
java.lang.String |
getName()
|
java.lang.String |
getPass()
|
int |
getTies()
|
int |
getWins()
|
void |
lost()
Increment the losses of the player |
void |
tied()
Increment the ties of the player |
void |
won()
Increment the wins of the player |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlayerProfile(java.lang.String initName,
java.lang.String initPass)
| Method Detail |
|---|
public PlayerProfile clone()
clone in class java.lang.Objectpublic void won()
public void lost()
public void tied()
public int getWins()
public int getLosses()
public int getTies()
public java.lang.String getName()
public java.lang.String getPass()
public void changePass(java.lang.String newPass)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||