public abstract class GameFactory extends Object
Constructor and Description |
---|
GameFactory() |
Modifier and Type | Method and Description |
---|---|
abstract Game |
createGame(DAC dac,
GameStartData data)
Factory method which creates the game based on the given data.
|
static GameFactory |
get(String name) |
static GameFactory |
getByAlias(DAC dac,
String alias)
Gets the game factory registered for the given alias.
|
int |
getMinimumPlayers()
The minimum required number of player to start
a new game for this factory.
|
static void |
register(String name,
GameFactory factory,
String... aliases)
Registers a GameFactory with the given name & aliases.
|
public GameFactory()
public static void register(String name, GameFactory factory, String... aliases)
public static GameFactory get(String name)
public static GameFactory getByAlias(DAC dac, String alias)
UnknownGameType
- if the game factory can't be found.public int getMinimumPlayers()
public abstract Game createGame(DAC dac, GameStartData data)
Copyright © 2012. All Rights Reserved.