net.vee.btech.saikoro.event
Class GameEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--net.vee.btech.saikoro.event.GameEvent
All Implemented Interfaces:
java.io.Serializable

public class GameEvent
extends java.util.EventObject

A Game event. Game events are generated when some event effected the game.

See Also:
Serialized Form

Field Summary
static int UNIT_ADDED
           
static int UNIT_REMOVED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GameEvent(Game aSrc)
          Constructs a new GameEvent.
GameEvent(Game aSrc, int aType)
          Constructs a new GameEvent.
 
Method Summary
 int getEventType()
          Returns the event type.
 Game getSourceGame()
          A convenience method which returns the event's originating game.
 
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
 

Field Detail

UNIT_ADDED

public static final int UNIT_ADDED

UNIT_REMOVED

public static final int UNIT_REMOVED
Constructor Detail

GameEvent

public GameEvent(Game aSrc)
Constructs a new GameEvent.
Parameters:
aSrc - the Game at which the event originated.

GameEvent

public GameEvent(Game aSrc,
                 int aType)
Constructs a new GameEvent.
Parameters:
aSrc - the Game at which the event originated.
aType - the type of event.
Method Detail

getSourceGame

public Game getSourceGame()
A convenience method which returns the event's originating game.
Returns:
the event's originating game, the same object as getSource().

getEventType

public int getEventType()
Returns the event type.