public abstract class PuzzleManager extends GameManager implements PuzzleCodes, PuzzleGameProvider
GameManager with facilities for puzzle games.DEBUG_PUZZLE, DEFAULT_DIFFICULTY, PUZZLE_MESSAGE_BUNDLEACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERRORALREADY_AT_TABLE, BANNED_FROM_TABLE, GAME_ALREADY_STARTED, INVALID_TABLE_POSITION, INVITATION_ACCEPTED, INVITATION_COUNTERED, INVITATION_REFUSED, INVITEE_NOT_ONLINE, MUST_BE_CREATOR, NO_SELF_BOOT, NO_SUCH_TABLE, NOT_AT_TABLE, PARLOR_GROUP, TABLE_POSITION_OCCUPIEDGAME_CHAT_TYPE, GAME_MESSAGE_BUNDLE, PLAYER_KNOCKED_OUT, WINNERS_AND_LOSERS| Constructor and Description |
|---|
PuzzleManager() |
| Modifier and Type | Method and Description |
|---|---|
Board[] |
getBoards()
Returns the boards for all players.
|
BoardSummary |
getBoardSummary(int pidx)
Returns the board summary for the given player index.
|
boolean |
needsBoardSummaries()
Returns whether this puzzle cares to make use of per-player board summaries that are sent
periodically to all users in the puzzle via
sendStatusUpdate(). |
void |
updateBoardSummaries()
Applies updateBoardSummary on all the players' boards.
|
void |
updateBoardSummary(int pidx)
Calls
BoardSummary.summarize() on the given player's board summary to refresh the
summary information in preparation for sending along to the client(s). |
void |
updateProgress(com.threerings.presents.data.ClientObject caller,
int sessionId,
int[] events)
Handles a
PuzzleGameService.updateProgress(int, int[]) request. |
void |
updateProgressSync(com.threerings.presents.data.ClientObject caller,
int sessionId,
int[] events,
Board[] states)
Called when the puzzle manager receives a progress update.
|
addPlayer, addPlayerAt, allPlayersReady, cancelGame, checkWritePermission, endGame, endPlayerGame, getGameConfig, getGameId, getMatchType, getPlayer, getPlayerCount, getPlayerDisplayName, getPlayerIndex, getPlayerName, getPlayerOid, getPlayerPersistentId, getPlayerPersistentId, getPlayerSlots, getPresentPlayerIndex, getSessionId, isActivePlayer, isAgent, isAI, isPlayer, occupantInRoom, playerIsReady, playerReady, removePlayer, replacePlayer, resetGame, setAI, shouldConcludeGame, startGame, systemMessage, systemMessageaddDelegate, applyToDelegates, applyToOccupants, bodyWillEnter, bodyWillLeave, checkPermissions, getConfig, getLocation, getPlaceObject, init, isValidSpeaker, messageReceived, ratifyBodyEntry, registerMessageHandler, shutdown, startup, toString, updateOccupantInfo, wherepublic Board[] getBoards()
public BoardSummary getBoardSummary(int pidx)
public boolean needsBoardSummaries()
sendStatusUpdate(). The default
implementation returns false.public void updateBoardSummary(int pidx)
BoardSummary.summarize() on the given player's board summary to refresh the
summary information in preparation for sending along to the client(s).pidx - the player index of the player whose board is to be summarized.public void updateBoardSummaries()
public void updateProgress(com.threerings.presents.data.ClientObject caller,
int sessionId,
int[] events)
PuzzleGameProviderPuzzleGameService.updateProgress(int, int[]) request.updateProgress in interface PuzzleGameProviderpublic void updateProgressSync(com.threerings.presents.data.ClientObject caller,
int sessionId,
int[] events,
Board[] states)
applyProgressEvents(int, int[], com.threerings.puzzle.data.Board[]).updateProgressSync in interface PuzzleGameProviderCopyright © 2015. All rights reserved.