civquest.units.gameChange
Class ConstructUnit

java.lang.Object
  extended bycivquest.gameChange.AbstractFieldNationUnitChange
      extended bycivquest.units.gameChange.ConstructUnit
All Implemented Interfaces:
FieldChange, GameChange, NationChange, UnitChange

public class ConstructUnit
extends AbstractFieldNationUnitChange

This GameChange constructs a new Unit and adds it to MapData. Before executing, the coords, unitIDs, nationIDs-arrays all have length 1 and store the field-coordinate / UnitChange.ADD_UNIT / the id of the nation the new unit belongs to. After having called execute, unitIDs[0] stores the id of the newly constructed unit.


Field Summary
 
Fields inherited from class civquest.gameChange.AbstractFieldNationUnitChange
coords, name, nationIDs, unitIDs
 
Fields inherited from interface civquest.gameChange.UnitChange
ADD_UNIT, NOT_KNOWN, RESET_UNIT_TIME
 
Fields inherited from interface civquest.gameChange.NationChange
ACTIVATE_NATION, ADD_NATION
 
Constructor Summary
ConstructUnit(java.lang.String modelName, Coordinate coord, int nation)
           
 
Method Summary
 void execute()
           
 
Methods inherited from class civquest.gameChange.AbstractFieldNationUnitChange
getCoords, getNationIDs, getUnitIDs, notifyListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstructUnit

public ConstructUnit(java.lang.String modelName,
                     Coordinate coord,
                     int nation)
Method Detail

execute

public void execute()