civquest.city.gameChange
Class ConstructCity

java.lang.Object
  extended bycivquest.gameChange.AbstractCityFieldNationChange
      extended bycivquest.city.gameChange.ConstructCity
All Implemented Interfaces:
CityChange, FieldChange, GameChange, NationChange

public class ConstructCity
extends AbstractCityFieldNationChange

This GameChange constructs a new City and places it on a given map-Field. It performs all necessary datastructure-updates. Before executing, the coords, cityIDs, playerIDs-arrays all have length 1 and store the field-coordinate / CityChange.ADD_UNIT / the id of the player the new city belongs to. After having called execute, cityIDs has length 1 and cityIDs[0] stores the id of the newly constructed city.


Field Summary
 
Fields inherited from class civquest.gameChange.AbstractCityFieldNationChange
cityIDs, coords, name, nationIDs
 
Fields inherited from interface civquest.gameChange.CityChange
ADD_CITY
 
Fields inherited from interface civquest.gameChange.NationChange
ACTIVATE_NATION, ADD_NATION
 
Constructor Summary
ConstructCity(Coordinate coord, int nation)
           
 
Method Summary
 void execute()
           
 java.lang.String toString()
          Retrieve a String representation of this object
 
Methods inherited from class civquest.gameChange.AbstractCityFieldNationChange
getCityIDs, getCoords, getNationIDs, notifyListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstructCity

public ConstructCity(Coordinate coord,
                     int nation)
Method Detail

execute

public void execute()

toString

public java.lang.String toString()
Retrieve a String representation of this object

Returns:
a String representation of this object.
See Also:
Object.toString()