cluedo.info
Class SessionInfo

java.lang.Object
  |
  +--cluedo.info.CluedoInfo
        |
        +--cluedo.info.SessionInfo
Direct Known Subclasses:
SessionAddedInfo

public class SessionInfo
extends CluedoInfo

An instance of this class describes a session.

See Also:
CluedoPDU, Serialized Form

Field Summary
 int activePlayerIndex
          "Pointer" to the player who has to carry out the next draw.
 int directorId
          playerid of the director of this session.
 int sessionId
          id of the session
 java.lang.String sessionName
          Name of the session
 int state
          state of the session.
 int[] teamMates
          the players who participate in this session.
 
Fields inherited from class cluedo.info.CluedoInfo
ACCEPTED, CLOSED, DIRECTOR, EXPELLED, INVITED, LOOSER, NUMPLAYERS, OPENED, REJECTED, REMOVED, SERVERID, TEAMMATE, TERMINATED, UNKNOWN, WINNER
 
Constructor Summary
SessionInfo()
          All attributes are initialised to UNKNOWN or null.
SessionInfo(int directorId, java.lang.String sessionName)
          The directorid and the session name is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionId

public int sessionId
id of the session

sessionName

public java.lang.String sessionName
Name of the session

activePlayerIndex

public int activePlayerIndex
"Pointer" to the player who has to carry out the next draw. This attribute is an index into the field teamMates.

directorId

public int directorId
playerid of the director of this session.

teamMates

public int[] teamMates
the players who participate in this session.

state

public int state
state of the session. A session can be OPENED, CLOSED or TERMINATED. The game of an open session has not yet begun and other players can join the session. The game of a closed session has already begun and no other players can join. The game of a terminated session has already ended and the session waits to be removed.
Constructor Detail

SessionInfo

public SessionInfo()
All attributes are initialised to UNKNOWN or null.

SessionInfo

public SessionInfo(int directorId,
                   java.lang.String sessionName)
The directorid and the session name is set. The teamMates field is initialised and the director is the first team mate (teammates[0]).