civquest.units.gameChange
Class MoveUnit

java.lang.Object
  extended bycivquest.gameChange.AbstractFieldUnitChange
      extended bycivquest.units.gameChange.MoveUnit
All Implemented Interfaces:
FieldChange, GameChange, UnitChange

public class MoveUnit
extends AbstractFieldUnitChange

Moves a unit to a given field, which has to be a neighbor-field of the units current field.


Field Summary
 
Fields inherited from class civquest.gameChange.AbstractFieldUnitChange
coords, name, unitIDs
 
Fields inherited from interface civquest.gameChange.UnitChange
ADD_UNIT, NOT_KNOWN, RESET_UNIT_TIME
 
Constructor Summary
MoveUnit(Coordinate to, long unitID, int dTime)
          Constructs a new MoveUnit-GameChange.
 
Method Summary
 void execute()
           
 java.lang.String toString()
          Retrieve a String representation of this object
 
Methods inherited from class civquest.gameChange.AbstractFieldUnitChange
getCoords, getUnitIDs, notifyListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MoveUnit

public MoveUnit(Coordinate to,
                long unitID,
                int dTime)
Constructs a new MoveUnit-GameChange. It stores two coordinates (the units source-field and the dest-field of the move) and id of the moved unit.

Parameters:
to - dest-field of the move
unitID - id of the unit we want to move
dTime - time to add to timeUsedThisTurn
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()