org.jogre.common
Class Game

java.lang.Object
  extended byjava.util.Observable
      extended byorg.jogre.common.Game

public class Game
extends Observable

Game class which extends the data class

Version:
Alpha 0.2.1
Author:
Bob Marks

Field Summary
protected  String gameKey
          Game key - e.g.
protected  int maxNumOfConnectedUsers
          Maximum number of users which can connect to this game at any one time.
protected  int maxNumOfTables
          Maximum number of tables this server can host at any one time.
protected  TableList tableList
          List of tables current being played on this server.
protected  UserList userList
          List of users which are currently connected to the server.
 
Constructor Summary
Game(String gameKey)
          Constructor to a Game object.
 
Method Summary
 String getGameStr()
          Return the game part of the game key.
 String getKey()
          Return the key of the game.
 String getKeyAsDirectory()
          Converts a "directory unfriendly" key into a "directory friendly" key but changing the dashes and dots to underscores.
 TableList getTableList()
          Return the TableList object or table currently being played.
 UserList getUserList()
          Returns the UserList object of current connected users.
 String getVersionStr()
          Return the version part of the game key.
 String toString()
          Return the game as a String.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gameKey

protected String gameKey
Game key - e.g. chess-0.1.


maxNumOfConnectedUsers

protected int maxNumOfConnectedUsers
Maximum number of users which can connect to this game at any one time.


maxNumOfTables

protected int maxNumOfTables
Maximum number of tables this server can host at any one time.


userList

protected UserList userList
List of users which are currently connected to the server.


tableList

protected TableList tableList
List of tables current being played on this server.

Constructor Detail

Game

public Game(String gameKey)
Constructor to a Game object.

Parameters:
gameKey - Game key
Method Detail

getKey

public String getKey()
Return the key of the game.

Returns:

getKeyAsDirectory

public String getKeyAsDirectory()
Converts a "directory unfriendly" key into a "directory friendly" key but changing the dashes and dots to underscores.

Returns:

getGameStr

public String getGameStr()
Return the game part of the game key.

Returns:

getVersionStr

public String getVersionStr()
Return the version part of the game key.

Returns:

getUserList

public UserList getUserList()
Returns the UserList object of current connected users.

Returns:

getTableList

public TableList getTableList()
Return the TableList object or table currently being played.

Returns:

toString

public String toString()
Return the game as a String.

See Also:
Object.toString()