All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class game.GameInfo

java.lang.Object
   |
   +----game.GameInfo

public class GameInfo
extends Object
implements Serializable
GameInfo.java


Variable Index

 o clientGameClassName
Name of the class that has to be used in the Jags client to be able to connect to this game in the Jags server.
 o id
Unique ID of the game
 o maximumPlayers
Maximum number of players in this game.
 o name
Name of the game.
 o newGame
true if this is a new game, false for a played game.
 o numPlayers
Number of players currently playing this game (if not a new game).

Constructor Index

 o GameInfo(Game)
Creates a new GameInfo related to a new game.
 o GameInfo(GameHandler)
Creates a new GameInfo

Method Index

 o getClientGameClassName()
Returns the name of the class that has to be used in the Jags client to be able to connect to this game in the Jags server.
 o getGameId()
Returns the id of the game.
 o getGameName()
Returns the name of the game.
 o isNewGame()
Returns whether this is a new game.
 o setGameId(Object)
Sets the id of the game.
 o toString()
Returns a string representation of the object.
 o update(GameInfo)
Updates the current instance of GameInfo with data contained in the given other GameInfo.

Variables

 o newGame
 boolean newGame
true if this is a new game, false for a played game.

 o name
 String name
Name of the game.

 o clientGameClassName
 String clientGameClassName
Name of the class that has to be used in the Jags client to be able to connect to this game in the Jags server.

 o id
 Object id
Unique ID of the game

 o maximumPlayers
 int maximumPlayers
Maximum number of players in this game.

 o numPlayers
 int numPlayers
Number of players currently playing this game (if not a new game).

Constructors

 o GameInfo
 public GameInfo(Game game)
Creates a new GameInfo related to a new game.

 o GameInfo
 public GameInfo(GameHandler runningGame)
Creates a new GameInfo

Methods

 o isNewGame
 public boolean isNewGame()
Returns whether this is a new game.

Returns:
true if it is a new game, false if it is a running game.
 o getGameName
 public String getGameName()
Returns the name of the game.

 o getClientGameClassName
 public String getClientGameClassName()
Returns the name of the class that has to be used in the Jags client to be able to connect to this game in the Jags server.

 o getGameId
 public Object getGameId()
Returns the id of the game.

 o setGameId
 public void setGameId(Object id)
Sets the id of the game.

 o update
 public void update(GameInfo other)
Updates the current instance of GameInfo with data contained in the given other GameInfo. Everything is copied from the other object but the id that will remain unchanged.

Parameters:
other - the object containing the data from which to update.
 o toString
 public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index