java.lang.Object
org.zazof.jtegServer.Player
- public class Player
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$name
private java.lang.String $name
$connection
private ClientConnection $connection
$id
private int $id
$color
private int $color
$status
private int $status
$protocolVersion
private java.lang.String $protocolVersion
$conqueredCountries
private int $conqueredCountries
$exchangeCards
private int $exchangeCards
$cards
private java.util.Vector $cards
ENABLED
public static final int ENABLED
- See Also:
- Constant Field Values
STARTED
public static final int STARTED
- See Also:
- Constant Field Values
PLACING_ARMIES
public static final int PLACING_ARMIES
- See Also:
- Constant Field Values
POST_ARMIES
public static final int POST_ARMIES
- See Also:
- Constant Field Values
POST_ARMIES2
public static final int POST_ARMIES2
- See Also:
- Constant Field Values
IDLE
public static final int IDLE
- See Also:
- Constant Field Values
PLACING_ARMIES3
public static final int PLACING_ARMIES3
- See Also:
- Constant Field Values
ATTACKING
public static final int ATTACKING
- See Also:
- Constant Field Values
GETTING_CARDS
public static final int GETTING_CARDS
- See Also:
- Constant Field Values
LOST
public static final int LOST
- See Also:
- Constant Field Values
Player
public Player(ClientConnection connection)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getID
public int getID()
setID
public void setID(int id)
getColor
public int getColor()
setColor
public void setColor(int color)
getStatus
public int getStatus()
- status = "started, attacking, waiting, lost, ..."
setStatus
public void setStatus(int status)
sendMessage
public void sendMessage(java.lang.String message)
- sends a message to this player
sendMessage
public void sendMessage(Answer a)
- sends the answer to the player. The message send depends on the protocol used between
player and server.
getProtocol
public java.lang.String getProtocol()
setProtocol
public void setProtocol(java.lang.String protocol)
getConqueredCountries
public int getConqueredCountries()
setConqueredCountries
public void setConqueredCountries(int cc)
getNbCards
public int getNbCards()
addCard
public void addCard(Card c)
- adds a card to this player
removeCard
public void removeCard(int cardID)
getExchangeCards
public int getExchangeCards()
addExchangeCards
public void addExchangeCards()