public abstract class GameConfig extends com.threerings.crowd.data.PlaceConfig implements Cloneable
The game config object is also the mechanism used to instantiate the appropriate game
manager and controller. Every game must have an associated game config derived class that
overrides PlaceConfig.createController() and PlaceConfig.getManagerClassName(),
returning the appropriate game controller and manager class for that game. Thus the entire chain
of events that causes a particular game to be created is the construction of the appropriate
game config instance which is provided to the server as part of an invitation or via some other
matchmaking mechanism.
| Modifier and Type | Field and Description |
|---|---|
GameAI[] |
ais
Configurations for AIs to be used in this game.
|
static int |
PARTY
Matchmaking type constant: a game that starts immediately, and every user that enters is a
player.
|
com.threerings.util.Name[] |
players
The usernames of the players involved in this game, or an empty array if such information
is not needed by this particular game.
|
boolean |
rated
Indicates whether or not this game is rated.
|
static int |
SEATED_CONTINUOUS
Matchmaking type constant: a game that starts immediately, but only has a certain number of
player slots.
|
static int |
SEATED_GAME
Matchmaking type constant: a game that is started with a list of players, and those are the
only players that may play.
|
static String[] |
TYPE_STRINGS
Maps the matchmaking type codes into strings used in our XML configuration.
|
| Constructor and Description |
|---|
GameConfig() |
| Modifier and Type | Method and Description |
|---|---|
GameConfig |
clone() |
GameConfigurator |
createConfigurator()
Creates a configurator that can be used to create a user interface for configuring this
instance prior to starting the game.
|
TableConfigurator |
createTableConfigurator()
Creates a table configurator for initializing 'table' properties of the game.
|
boolean |
equals(Object other)
Returns true if this game config object is equal to the supplied object (meaning it is a
game config for the same game and its configuration settings are the same as ours).
|
List<String> |
getDescription()
Returns a List of strings that describe the configuration of this game.
|
abstract int |
getGameId()
Returns a numeric identifier for this game class.
|
abstract String |
getGameIdent()
Returns a string identifier for this game class (e.g.
|
int |
getMatchType()
Returns the matchmaking type of this game:
SEATED_GAME, etc. |
int |
hashCode()
Computes a hashcode for this game config object that supports our
equals(java.lang.Object)
implementation. |
public static final int SEATED_GAME
public static final int SEATED_CONTINUOUS
public static final int PARTY
public static final String[] TYPE_STRINGS
public com.threerings.util.Name[] players
public boolean rated
public GameAI[] ais
public abstract int getGameId()
public abstract String getGameIdent()
public int getMatchType()
SEATED_GAME, etc.public GameConfigurator createConfigurator()
public TableConfigurator createTableConfigurator()
public List<String> getDescription()
public boolean equals(Object other)
public int hashCode()
equals(java.lang.Object)
implementation. Objects that are equal should have the same hashcode.public GameConfig clone()
Copyright © 2015. All rights reserved.