Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.zazof.jtegServer
Class Player  view Player download Player.java

java.lang.Object
  extended byorg.zazof.jtegServer.Player

public class Player
extends java.lang.Object


Field Summary
private  java.util.Vector $cards
           
private  int $color
           
private  ClientConnection $connection
           
private  int $conqueredCountries
           
private  int $exchangeCards
           
private  int $id
           
private  java.lang.String $name
           
private  java.lang.String $protocolVersion
           
private  int $status
           
static int ATTACKING
           
static int ENABLED
           
static int GETTING_CARDS
           
static int IDLE
           
static int LOST
           
static int PLACING_ARMIES
           
static int PLACING_ARMIES3
           
static int POST_ARMIES
           
static int POST_ARMIES2
           
static int STARTED
           
 
Constructor Summary
Player(ClientConnection connection)
           
 
Method Summary
 void addCard(Card c)
          adds a card to this player
 void addExchangeCards()
           
 int getColor()
           
 int getConqueredCountries()
           
 int getExchangeCards()
           
 int getID()
           
 java.lang.String getName()
           
 int getNbCards()
           
 java.lang.String getProtocol()
           
 int getStatus()
          status = "started, attacking, waiting, lost, ..."
 void removeCard(int cardID)
           
 void sendMessage(Answer a)
          sends the answer to the player.
 void sendMessage(java.lang.String message)
          sends a message to this player
 void setColor(int color)
           
 void setConqueredCountries(int cc)
           
 void setID(int id)
           
 void setName(java.lang.String name)
           
 void setProtocol(java.lang.String protocol)
           
 void setStatus(int status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

$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
Constructor Detail

Player

public Player(ClientConnection connection)
Method Detail

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()