civquest.gameChange
Class AbstractFieldCityPlayerChange

java.lang.Object
  extended bycivquest.gameChange.AbstractFieldCityPlayerChange
All Implemented Interfaces:
CityChange, FieldChange, GameChange, PlayerChange

public abstract class AbstractFieldCityPlayerChange
extends java.lang.Object
implements FieldChange, CityChange, PlayerChange


Field Summary
protected  int[] cityIDs
           
protected  Coordinate[] coords
           
protected  java.lang.String name
           
protected  int[] playerIDs
           
 
Fields inherited from interface civquest.gameChange.CityChange
ADD_CITY
 
Fields inherited from interface civquest.gameChange.PlayerChange
ADD_PLAYER
 
Constructor Summary
AbstractFieldCityPlayerChange(Coordinate[] coords, int[] cityIDs, int[] playerIDs)
           
AbstractFieldCityPlayerChange(Coordinate coord, int cityID, int playerID)
           
 
Method Summary
 int[] getCityIDs()
          Returns the ids of all cities affected by this CityChange.
 Coordinate[] getCoords()
          Returns the Coordinate(s) of the Field(s) affected by this FieldChange.
 int[] getPlayerIDs()
          Returns information about all players affected by this PlayerChange.
 void notifyListeners()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface civquest.gameChange.GameChange
execute
 

Field Detail

coords

protected Coordinate[] coords

cityIDs

protected int[] cityIDs

playerIDs

protected int[] playerIDs

name

protected java.lang.String name
Constructor Detail

AbstractFieldCityPlayerChange

public AbstractFieldCityPlayerChange(Coordinate coord,
                                     int cityID,
                                     int playerID)

AbstractFieldCityPlayerChange

public AbstractFieldCityPlayerChange(Coordinate[] coords,
                                     int[] cityIDs,
                                     int[] playerIDs)
Method Detail

getCoords

public Coordinate[] getCoords()
Description copied from interface: FieldChange
Returns the Coordinate(s) of the Field(s) affected by this FieldChange. Implementors may define which index has which meaning (an example is: FieldChange moveUnit, index 0 = source-field, index 1 = dest-field).

Specified by:
getCoords in interface FieldChange
Returns:
the Coordinate(s) of the Field(s) affected by this FieldChange

getCityIDs

public int[] getCityIDs()
Description copied from interface: CityChange
Returns the ids of all cities affected by this CityChange. Under certain circumstances, the array may also contain constants defined in this interface. See interface GameChange for details.

Specified by:
getCityIDs in interface CityChange
Returns:
array as described

getPlayerIDs

public int[] getPlayerIDs()
Description copied from interface: PlayerChange
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.

Specified by:
getPlayerIDs in interface PlayerChange
Returns:
int-array as described above

notifyListeners

public void notifyListeners()
Specified by:
notifyListeners in interface GameChange