civquest.gameChange
Interface UnitChange

All Superinterfaces:
GameChange
All Known Implementing Classes:
AbstractFieldNationUnitChange, AbstractFieldUnitChange, AbstractFieldUnitPlayerChange, AbstractUnitChange

public interface UnitChange
extends GameChange

A GameChange that adds/alters/moves/removes a Unit in some way.


Field Summary
static long ADD_UNIT
          Indicates that this UnitChange constructs and adds a unit.
static long NOT_KNOWN
          Indicates that for some (logical) reason, the unit affected by this UnitChange is not yet known.
static long RESET_UNIT_TIME
          Indicates that this UnitChange resets the time a unit has left this turn.
 
Method Summary
 long[] getUnitIDs()
          Returns the information about all units (usually exactly one unit will be affected, but there may be special cases) affected by this UnitChange.
 
Methods inherited from interface civquest.gameChange.GameChange
execute, notifyListeners
 

Field Detail

ADD_UNIT

public static final long ADD_UNIT
Indicates that this UnitChange constructs and adds a unit. For this reason, no unit-id can be given at this time.

See Also:
Constant Field Values

NOT_KNOWN

public static final long NOT_KNOWN
Indicates that for some (logical) reason, the unit affected by this UnitChange is not yet known. An example is a UnitChange like "mark the top unit".

See Also:
Constant Field Values

RESET_UNIT_TIME

public static final long RESET_UNIT_TIME
Indicates that this UnitChange resets the time a unit has left this turn.

See Also:
Constant Field Values
Method Detail

getUnitIDs

public long[] getUnitIDs()
Returns the information about all units (usually exactly one unit will be affected, but there may be special cases) affected by this UnitChange. Implementors may define which index has which meaning. If a value is >= 0, it is the ID of a unit affected by this UnitChange. If a value is < 0, it indicates some special case/event according to the constants defined above.

Returns:
an array as specified above