org.jogre.comm
Class CommTableAction

java.lang.Object
  |
  +--org.jogre.comm.CommSimpleMessage
        |
        +--org.jogre.comm.CommTableMessage
              |
              +--org.jogre.comm.CommTableAction
All Implemented Interfaces:
ITransmittable

public class CommTableAction
extends CommTableMessage

Communication class for performming table actions such as creating a new table, joining an existing table, standing up, being ready-to-start and exitting from a table.

Version:
Alpha 0.1
Author:
Bob Marks

Field Summary
static int EXIT
          Exit from a table.
static int JOIN
          Join an existing game.
static int NEW
          Create a new table.
static int NEXT_PLAYER
          Next player
static int READY_TO_START
          Ready to start a game.
static int STAND_UP
          Stand up from a game.
static int START
          Actually start the game.
 
Fields inherited from class org.jogre.comm.CommTableMessage
isPublic, NO_TABLE, tableNum
 
Fields inherited from class org.jogre.comm.CommSimpleMessage
status, username
 
Constructor Summary
CommTableAction(String inString)
          Constructor which creates a CommTableAction object from the flatten () method of another CommTableAction object.
CommTableAction(String username, boolean isPublic)
          Creating a new table.
CommTableAction(String username, int status, int tableNum)
          Used when a player plays (or stops playing) at a particular game.
CommTableAction(String username, int status, int tableNum, boolean isPublic)
          Used for inviting a user.
 
Method Summary
 String flatten()
          Flatten the String for transmission purposes.
 
Methods inherited from class org.jogre.comm.CommTableMessage
getTableNum, isPublic
 
Methods inherited from class org.jogre.comm.CommSimpleMessage
getStatus, getUsername
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEW

public static final int NEW
Create a new table.

JOIN

public static final int JOIN
Join an existing game.

STAND_UP

public static final int STAND_UP
Stand up from a game.

READY_TO_START

public static final int READY_TO_START
Ready to start a game.

START

public static final int START
Actually start the game.

NEXT_PLAYER

public static final int NEXT_PLAYER
Next player

EXIT

public static final int EXIT
Exit from a table.
Constructor Detail

CommTableAction

public CommTableAction(String username,
                       int status,
                       int tableNum,
                       boolean isPublic)
Used for inviting a user.
Parameters:
username - User who send the CommInvite object.
status - Status of the message
tableNum - Table number of the message.
isPublic - Boolean to specifie if the table is public or not.

CommTableAction

public CommTableAction(String username,
                       boolean isPublic)
Creating a new table.
Parameters:
username - Username
isPublic - boolean to show if a table is public or not.

CommTableAction

public CommTableAction(String username,
                       int status,
                       int tableNum)
Used when a player plays (or stops playing) at a particular game.
Parameters:
username - User who send the CommInvite object.
status - Status of the message
tableNum - Table number of the message.

CommTableAction

public CommTableAction(String inString)
                throws TransmissionException
Constructor which creates a CommTableAction object from the flatten () method of another CommTableAction object.
Parameters:
inString -  
Throws:
TransmissionException -  
Method Detail

flatten

public String flatten()
Flatten the String for transmission purposes.
See Also:
ITransmittable.flatten()