com.epochx.action
Class AntAction

java.lang.Object
  extended by com.epochx.action.Action
      extended by com.epochx.action.AntAction
Direct Known Subclasses:
AntMoveAction, AntSkipAction, AntTurnLeftAction, AntTurnRightAction

public abstract class AntAction
extends Action

An AntAction is the superclass for all actions in the artificial ant domain. It provides a mechanism for accessing the Ant object to be acted upon.

See Also:
Ant

Field Summary
 
Fields inherited from class com.epochx.action.Action
DO_NOTHING
 
Constructor Summary
AntAction(Ant ant)
          Constructs an AntAction, supplying an ant that the action can be performed on.
 
Method Summary
 Ant getAnt()
          Returns the Ant object that this Action acts upon.
 
Methods inherited from class com.epochx.action.Action
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AntAction

public AntAction(Ant ant)
Constructs an AntAction, supplying an ant that the action can be performed on.

Parameters:
ant - the Ant that can be acted upon.
Method Detail

getAnt

public Ant getAnt()
Returns the Ant object that this Action acts upon.

Returns:
the Ant object that this Action acts upon.