|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlab1.GameFactory
public class GameFactory
Factory class for available games.
Constructor Summary | |
---|---|
GameFactory()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GameFactory()
Method Detail |
---|
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |