|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlecturequiz.server.main.GameManager
public class GameManager
Method Summary | |
---|---|
void |
endGame(AbstractGameMode game)
|
AbstractGameMode |
getGame(java.lang.String quizCode)
Returns a game instance corresponding to the given quiz code |
static GameManager |
getInstance()
Get the GameManager instance, or create a new one if it doesn't exist |
java.util.ArrayList<GameModeInfo> |
getSupportedGameModes()
Returns a list of the supported game modes |
boolean |
isGameModeSupported(java.lang.String gameMode)
Check if the supplied game mode is supported by the game server. |
int |
newQuiz(java.lang.String gameMode,
int quizId,
java.lang.String quizCode,
User owner,
java.util.List<ParameterEntry> parameters)
Creates a new game instance with the supplied game mode, quiz and quiz code. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static GameManager getInstance()
public boolean isGameModeSupported(java.lang.String gameMode)
gameMode
- The game mode to check.
public int newQuiz(java.lang.String gameMode, int quizId, java.lang.String quizCode, User owner, java.util.List<ParameterEntry> parameters)
gameMode
- The game mode of this gamequizId
- The ID of the quiz to startquizCode
- The quiz code needed to join this gameparameters
- Custom parameters sent to the game mode on creation. Can be null.
public AbstractGameMode getGame(java.lang.String quizCode)
quizCode
- the quiz code of the game to return
public java.util.ArrayList<GameModeInfo> getSupportedGameModes()
public void endGame(AbstractGameMode game)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |