|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdd.sim.SimObject
dd.sim.Player
A simple class template. The idea is that you can copy this file and modify stuff where necessary. It provides examples of javadoc comments and basic formatting conventions. Hopefully this is useful for cutting and pasting.
If you want to start a new paragraph in Javadoc, you need a blank line and paragraph tags, as shown here. Note the closing tag for a paragraph is optional.
Field Summary |
Fields inherited from class dd.sim.SimObject |
attributes |
Constructor Summary | |
Player()
The null constructor creates the "nobody" player and should never be called directly. |
|
Player(int turnNumber,
java.lang.String name)
Creates a new player object. |
Method Summary | |
int |
compareTo(java.lang.Object o)
|
void |
disconnected()
|
boolean |
equals(java.lang.Object other)
|
int |
getFavors()
|
int |
getFavorsPerTurn()
|
java.lang.String |
getName()
|
java.lang.String |
getPlayerID()
|
java.lang.String |
getRole()
|
int |
getTurnNumber()
|
int |
getVotes()
|
boolean |
isConnected()
|
static void |
main(java.lang.String[] args)
|
static Player |
nobody()
Returns the "nobody" player. |
void |
reset()
|
void |
setConnected(boolean connected)
|
void |
setName(java.lang.String name)
|
void |
setRole(java.lang.String role)
|
void |
setVotes(int votes)
|
void |
spendVotes(int votes)
spendVotes decrements votes first, and when there are no votes left, spends favors to get extra votes on a one-for-one basis. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Player()
public Player(int turnNumber, java.lang.String name)
Method Detail |
public static Player nobody()
public boolean isConnected()
public void disconnected()
public void setConnected(boolean connected)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getRole()
public void setRole(java.lang.String role)
public java.lang.String getPlayerID()
public int getTurnNumber()
public int getFavorsPerTurn()
public void reset()
public void setVotes(int votes)
public int getVotes()
public int getFavors()
public void spendVotes(int votes)
public boolean equals(java.lang.Object other)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |