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
-
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.
-
id
-
Unique ID of the game
-
maximumPlayers
- Maximum number of players in this game.
-
name
- Name of the game.
-
newGame
- true if this is a new game, false for a played game.
-
numPlayers
- Number of players currently playing this game (if
not a new game).
-
GameInfo(Game)
- Creates a new GameInfo related to a new game.
-
GameInfo(GameHandler)
- Creates a new GameInfo
-
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.
-
getGameId()
- Returns the id of the game.
-
getGameName()
- Returns the name of the game.
-
isNewGame()
- Returns whether this is a new game.
-
setGameId(Object)
- Sets the id of the game.
-
toString()
- Returns a string representation of the object.
-
update(GameInfo)
- Updates the current instance of
GameInfo
with data
contained in the given other GameInfo
.
newGame
boolean newGame
- true if this is a new game, false for a played game.
name
String name
- Name of the game.
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.
id
Object id
- Unique ID of the game
maximumPlayers
int maximumPlayers
- Maximum number of players in this game.
numPlayers
int numPlayers
- Number of players currently playing this game (if
not a new game).
GameInfo
public GameInfo(Game game)
- Creates a new GameInfo related to a new game.
GameInfo
public GameInfo(GameHandler runningGame)
- Creates a new GameInfo
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.
getGameName
public String getGameName()
- Returns the name of the game.
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.
getGameId
public Object getGameId()
- Returns the id of the game.
setGameId
public void setGameId(Object id)
- Sets the id of the game.
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.
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