|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectictk.boardgame.Player
a Player represents a person, team or computer that is playing the game. All the methods of Player might not make sense for all subclasses (eg: any Team implementation does not need a firstname / lastname) but over interfacing this class doesn't make engineering sense.
Constructor Summary | |
Player()
|
|
Player(java.lang.String n)
|
Method Summary | |
boolean |
equals(java.lang.Object o)
compares the lastname and firstname of the players |
java.lang.String |
getFirstName()
|
java.lang.String |
getLastName()
|
java.lang.String |
getName()
used to get name of player in form "Lastname, Firstname" or just "Lastname" if no firstname is set. |
int |
hashCode()
uses lastname and firstname to compute the hash |
void |
setFirstName(java.lang.String f)
|
void |
setLastName(java.lang.String l)
|
java.lang.String |
toString()
a diagnostic tool only, currently returns getName(); |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Player()
public Player(java.lang.String n)
n
- - "lastname, firstname" combo. If a string "name" is
it will be set to the lastname.Method Detail |
public java.lang.String getLastName()
public java.lang.String getFirstName()
public void setLastName(java.lang.String l)
public void setFirstName(java.lang.String f)
public java.lang.String getName()
public java.lang.String toString()
public boolean equals(java.lang.Object o)
public int hashCode()
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |