public abstract class PuzzleController extends GameController implements PuzzleCodes
| Modifier and Type | Class and Description |
|---|---|
static interface |
PuzzleController.ClearPender
|
| Modifier and Type | Field and Description |
|---|---|
static String |
TOGGLE_CHATTING
The action command to toggle chatting mode.
|
DISPATCHERDEBUG_PUZZLE, DEFAULT_DIFFICULTY, PUZZLE_MESSAGE_BUNDLE| Constructor and Description |
|---|
PuzzleController() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProgressEvent(int event,
Board board)
Adds the given progress event and a snapshot of the supplied board state to the set of
progress events and associated board states for later transmission to the server.
|
void |
attributeChanged(com.threerings.presents.dobj.AttributeChangedEvent event) |
void |
didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
Removes our listener registration from the game object and cleans house.
|
Board |
getBoard()
Returns the board associated with the puzzle.
|
int |
getEventCount()
Returns the number of progress events currently queued up for sending to the server with
the next progress update.
|
String |
getPauseString()
Get the (untranslated) string to display when the puzzle is paused.
|
int |
getPlayerIndex()
Returns the player's index in the list of players for the game.
|
boolean |
handleAction(ActionEvent action)
Handles basic game controller action events.
|
boolean |
hasAction()
Returns true if the puzzle has action, false if the action is cleared or it is suspended.
|
boolean |
isChatting()
Returns true if the puzzle has been defocused because the player is doing some chatting.
|
void |
mayLeavePlace(com.threerings.crowd.data.PlaceObject plobj) |
void |
sendProgressUpdate()
Sends the server a game progress update with the list of events, as well as board states if
PuzzlePanel.isSyncingBoards() is true. |
void |
setBoard(Board board)
Called when a new board is set.
|
void |
setChatting(boolean chatting)
Sets whether we're focusing on the chat window rather than the puzzle.
|
void |
setGameOver(boolean gameOver)
Sets the client game over override.
|
void |
willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
Adds this controller as a listener to the game object (thus derived classes need not do so)
and lets the game manager know that we are now ready to go.
|
getMatchType, getSessionId, init, isGameOver, resetGame, systemMessagegetPlaceConfig, getPlaceViewactionPerformed, configureAction, createActionButton, handleAction, handleAction, handleAction, postAction, postAction, postAction, setControlledPanel, wasAdded, wasRemovedpublic static final String TOGGLE_CHATTING
public Board getBoard()
public int getPlayerIndex()
public void setGameOver(boolean gameOver)
GameControllersetGameOver in class GameControllerpublic boolean hasAction()
public void setChatting(boolean chatting)
public String getPauseString()
public boolean isChatting()
public void willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
GameControllerwillEnterPlace in class GameControllerpublic void mayLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
mayLeavePlace in class com.threerings.crowd.client.PlaceControllerpublic void didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
GameControllerdidLeavePlace in class GameControllerpublic void attributeChanged(com.threerings.presents.dobj.AttributeChangedEvent event)
attributeChanged in interface com.threerings.presents.dobj.AttributeChangeListenerattributeChanged in class GameControllerpublic void setBoard(Board board)
public boolean handleAction(ActionEvent action)
GameControllersuper.handleAction for events they don't specifically handle.handleAction in class GameControllerpublic int getEventCount()
public void addProgressEvent(int event,
Board board)
public void sendProgressUpdate()
PuzzlePanel.isSyncingBoards() is true.Copyright © 2015. All rights reserved.