|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject de.tabacha.cgo.GameEvent
Holds information about a change in the game. Possible changes are:
GameListener
,
Serialized FormField Summary |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
GameEvent(Game game,
boolean direction)
Constructor. |
|
GameEvent(Game game,
boolean playerDirection,
Move move)
Called when a move has been performed. |
|
GameEvent(Game game,
boolean direction,
Move move,
java.lang.String message)
Constructor. |
Method Summary | |
boolean |
getDirection()
Meaning of return value depends. |
Game |
getGame()
Returns the game where this event evolved. |
java.lang.String |
getMessage()
Returns the key for the locale resource bundle for textual information about the event. |
Move |
getMove()
For hasMoved : Returns the move that has just been performed. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GameEvent(Game game, boolean direction)
direction
- Meaning depends on the type of event.getDirection()
,
GameListener
public GameEvent(Game game, boolean playerDirection, Move move)
playerDirection
- Direction of the player that made the movemove
- The move that has been performed.public GameEvent(Game game, boolean direction, Move move, java.lang.String message)
direction
- Meaning depends on the type of event.move
- The last move. May be null if information is not useful.message
- A short text with more information.getDirection()
,
GameListener
Method Detail |
public Game getGame()
public java.lang.String getMessage()
public boolean getDirection()
Constants.UP
or Constants.DOWN
public Move getMove()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |