civquest.gameChange
Class AbstractCityFieldNationChange
java.lang.Object
civquest.gameChange.AbstractCityFieldNationChange
- All Implemented Interfaces:
- CityChange, FieldChange, GameChange, NationChange
- Direct Known Subclasses:
- ConstructCity
- public abstract class AbstractCityFieldNationChange
- extends java.lang.Object
- implements FieldChange, CityChange, NationChange
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[] |
getNationIDs()
Returns information about all nations affected by this NationChange. |
void |
notifyListeners()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
coords
protected Coordinate[] coords
cityIDs
protected int[] cityIDs
nationIDs
protected int[] nationIDs
name
protected java.lang.String name
AbstractCityFieldNationChange
public AbstractCityFieldNationChange(Coordinate coord,
int cityID,
int nationID)
AbstractCityFieldNationChange
public AbstractCityFieldNationChange(Coordinate[] coords,
int[] cityIDs,
int[] nationIDs)
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
getNationIDs
public int[] getNationIDs()
- Description copied from interface:
NationChange
- Returns information about all nations affected by this NationChange. Implementors may define
which index has which meaning (for example: NationChange = TransferMoney, index 0 = nation loosing
money, index 1 = nation getting the money).
A value >= 0 indicates the id of a nation, a value < 0 must be one of the constants defined above.
- Specified by:
getNationIDs
in interface NationChange
- Returns:
- int-array as described above
notifyListeners
public void notifyListeners()
- Specified by:
notifyListeners
in interface GameChange