civquest.gameChange
Interface PlayerChange

All Superinterfaces:
GameChange
All Known Implementing Classes:
AbstractFieldCityPlayerChange, AbstractFieldUnitPlayerChange

public interface PlayerChange
extends GameChange

A PlayerChange is a GameChange modifying one or several players in some way. A GameChange is a PlayerChange, if one of the following conditions meet: (1) properties of the Player (for example its name) change (2) he looses or gains something (3) Something the player owns is altered in some way: This is a PlayerChange, if you can't determine the affected player otherwise. For example, a unit knows by whom it is owned.


Field Summary
static int ADD_PLAYER
          This constant marks the fact that a PlayerChange adds a player.
 
Method Summary
 int[] getPlayerIDs()
          Returns information about all players affected by this PlayerChange.
 
Methods inherited from interface civquest.gameChange.GameChange
execute, notifyListeners
 

Field Detail

ADD_PLAYER

public static final int ADD_PLAYER
This constant marks the fact that a PlayerChange adds a player. Therefore, its id is unknown until execution of the PlayerChange.

See Also:
Constant Field Values
Method Detail

getPlayerIDs

public int[] getPlayerIDs()
Returns information about all players affected by this PlayerChange. Implementors may define which index has which meaning (for example: PlayerChange = TransferMoney, index 0 = player loosing money, index 1 = player getting the money). A value >= 0 indicates the id of a player, a value < 0 must be one of the constants defined above.

Returns:
int-array as described above