civquest.gameChange
Class AbstractFieldCityChange

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

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

AbstractFieldUnitChange.java


Field Summary
protected  int[] cityIDs
           
protected  Coordinate[] coords
           
protected  java.lang.String name
           
 
Fields inherited from interface civquest.gameChange.CityChange
ADD_CITY
 
Constructor Summary
AbstractFieldCityChange()
           
AbstractFieldCityChange(Coordinate[] coords, int[] cityIDs)
           
AbstractFieldCityChange(Coordinate coord, int cityID)
           
 
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.
 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

cityIDs

protected int[] cityIDs

coords

protected Coordinate[] coords

name

protected java.lang.String name
Constructor Detail

AbstractFieldCityChange

public AbstractFieldCityChange()

AbstractFieldCityChange

public AbstractFieldCityChange(Coordinate coord,
                               int cityID)

AbstractFieldCityChange

public AbstractFieldCityChange(Coordinate[] coords,
                               int[] cityIDs)
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

notifyListeners

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