cluedo.info
Class PlayerInfo

java.lang.Object
  |
  +--cluedo.info.CluedoInfo
        |
        +--cluedo.info.PlayerInfo
Direct Known Subclasses:
PlayerAddedInfo

public class PlayerInfo
extends CluedoInfo

An object of this class describes a player.

See Also:
CluedoPDU, DrawFinishedInfo, Serialized Form

Field Summary
 int currentDice
          last dice thrown by this player
 java.lang.String name
          name of the player.
 int numberOfCards
          the number of cards this player holds
 int playerId
          id of the player.
 int sessionId
          id of the session the player participates
 int state
          state of the player.
 int teamId
          indicates the identity of this player in a session.
 int x
          position in the play field
 int y
          position in the play field
 
Fields inherited from class cluedo.info.CluedoInfo
ACCEPTED, CLOSED, DIRECTOR, EXPELLED, INVITED, LOOSER, NUMPLAYERS, OPENED, REJECTED, REMOVED, SERVERID, TEAMMATE, TERMINATED, UNKNOWN, WINNER
 
Constructor Summary
PlayerInfo()
           
PlayerInfo(int playerId, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

playerId

public int playerId
id of the player.

name

public java.lang.String name
name of the player.

state

public int state
state of the player. Can be either UNKNOWN, DIRECTOR, or TEAMMATE

teamId

public int teamId
indicates the identity of this player in a session. An example for a role is "Professor Bloom". The teamId is the index in the teamMates field of the session this client is playing in.

sessionId

public int sessionId
id of the session the player participates

x

public int x
position in the play field

y

public int y
position in the play field

currentDice

public int currentDice
last dice thrown by this player

numberOfCards

public int numberOfCards
the number of cards this player holds
Constructor Detail

PlayerInfo

public PlayerInfo()

PlayerInfo

public PlayerInfo(int playerId,
                  java.lang.String name)