public class Player extends java.lang.Object implements java.lang.Comparable<Player>
parsePlayer(String)
.Constructor and Description |
---|
Player()
Create a default/empty Player
|
Player(java.lang.String playerName)
Convienence constructor to set the player's name.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Player o)
String compare the name of this player with that one.
|
int |
getBfFlag()
Get the BuckoFIBS flag (not used yet)
|
java.lang.String |
getBfStatus()
If this player has a special status string, like an invite warning, it goes here.
|
java.lang.String |
getClient()
What client is this player using?
|
java.lang.String |
getEmail()
What is this player's email address?
|
int |
getExperience()
Get the number of games this player has played
|
java.lang.String |
getHostName()
Get the hostname of the machine this player is playing on.
|
int |
getId()
Get the local player id.
|
int |
getIdleTime()
How long has this player been idle?
|
long |
getLoginTime()
When did this player log in?
|
java.lang.String |
getMissManners()
If this player has a MissManners warning, this is it.
|
java.lang.String |
getName()
Get the username of this player
|
java.lang.String |
getOpponent()
If this player is playing someone, then return the opponent's name.
|
double |
getRating()
Get the rating for this player
|
java.lang.String |
getSavedMatch()
If you have a saved match with this player, then this string describes it.
|
java.lang.String |
getWatching()
If this player is watching someone, then return the name of the player we are watching.
|
WinLoss |
getWinLoss()
Return a string of your won/loss record against this player.
|
boolean |
isAway()
Has this player marked himself as away?
|
boolean |
isInvited()
Have we invited this player?
|
boolean |
isPlaying()
Return true if this player is playing someone.
|
boolean |
isReady()
Is this player ready to play?
|
boolean |
parsePlayer(java.lang.String s)
Parse this player from a FIBS string.
|
void |
setBfFlag(int bfFlag)
Set the BuckoFIBS flag (not used yet)
|
void |
setBfStatus(java.lang.String bfStatus)
If this player has a special status string, like an invite warning, it goes here.
|
void |
setClient(java.lang.String client)
Set the name of the client that this player is using.
|
void |
setId(int id)
Set the local player id.
|
void |
setInvited(boolean invited) |
void |
setMissManners(java.lang.String missManners)
Set the MissManners warning issued about this player
|
void |
setName(java.lang.String name)
Set the username of this player.
|
void |
setSavedMatch(java.lang.String savedMatch)
Set the savedMatch (tooltip) text
|
void |
setWinLoss(int wins,
int losses)
Set the string of your won/loss record against this player.
|
public Player()
public Player(java.lang.String playerName)
playerName
- The name of this new player.public int getId()
public void setId(int id)
id
- the id to setpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The player's namepublic boolean isPlaying()
public java.lang.String getOpponent()
public java.lang.String getWatching()
public boolean isReady()
public boolean isAway()
public double getRating()
public int getExperience()
public int getIdleTime()
public long getLoginTime()
public java.lang.String getHostName()
public java.lang.String getClient()
public void setClient(java.lang.String client)
client
- public java.lang.String getEmail()
public WinLoss getWinLoss()
public void setWinLoss(int wins, int losses)
wins
- The number of times you have beaten this opponent.losses
- The number of times you have lost to this opponent.public int getBfFlag()
public void setBfFlag(int bfFlag)
bfFlag
- the bfFlag to setpublic java.lang.String getBfStatus()
public void setBfStatus(java.lang.String bfStatus)
bfStatus
- the bfStatus to setpublic boolean isInvited()
public void setInvited(boolean invited)
invited
- the invited to setpublic java.lang.String getSavedMatch()
public void setSavedMatch(java.lang.String savedMatch)
savedMatch
- the savedMatch to setpublic java.lang.String getMissManners()
public void setMissManners(java.lang.String missManners)
missManners
- the missManners to setpublic boolean parsePlayer(java.lang.String s)
s
- The who info line from FIBS