|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SOCScenarioEventListener
Listener for scenario events on the large sea board.
Threads: These events occur in game methods (or player methods) that change game state. So, whatever thread changed the game state, that same thread will run the listener callback method.
| Method Summary | |
|---|---|
void |
gameEvent(SOCGame ga,
SOCScenarioGameEvent evt,
java.lang.Object detail)
A scenario event has occurred whichs affect the game or board, not a specific player. |
void |
playerEvent(SOCGame ga,
SOCPlayer pl,
SOCScenarioPlayerEvent evt,
boolean flagsChanged,
java.lang.Object obj)
A per-player scenario event has occurred. |
| Method Detail |
|---|
void gameEvent(SOCGame ga,
SOCScenarioGameEvent evt,
java.lang.Object detail)
Threads: The game's treater thread handles incoming client messages and calls game methods that change state. Those same game methods will trigger the scenario events; so, the treater thread will also run this gameEvent callback.
ga - Gameevt - Event codedetail - Game piece, coordinate, or other data about the event, or null, depending on evt
void playerEvent(SOCGame ga,
SOCPlayer pl,
SOCScenarioPlayerEvent evt,
boolean flagsChanged,
java.lang.Object obj)
ga - Gamepl - Playerevt - Event codeflagsChanged - True if this event changed SOCPlayer.getScenarioPlayerEvents(),
SOCPlayer.getSpecialVP(), or another flag documented for evt in
SOCScenarioPlayerEventobj - Object related to the event, or null; documented for evt in SOCScenarioPlayerEvent.
Example: The SOCVillage for SOCScenarioPlayerEvent.CLOTH_TRADE_ESTABLISHED_VILLAGE.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||