public class GameFactory extends java.lang.Object implements IGameFactory
Constructor and Description |
---|
GameFactory() |
Modifier and Type | Method and Description |
---|---|
GameModel |
createGame(java.lang.String gameName)
Returns a new model object for the game corresponding to its Name.
|
java.lang.String[] |
getGameNames()
Returns an array with names of games this factory can create.
|
public java.lang.String[] getGameNames()
getGameNames
in interface IGameFactory
public GameModel createGame(java.lang.String gameName)
createGame
in interface IGameFactory
gameName
- The name of the game as given by getGameNames()java.lang.IllegalArgumentException
- if no such game