com.epochx.action
Class AntTurnRightAction

java.lang.Object
  extended by com.epochx.action.Action
      extended by com.epochx.action.AntAction
          extended by com.epochx.action.AntTurnRightAction

public class AntTurnRightAction
extends AntAction

This class defines an action which when executed will trigger the ant to turn right from its current orientation in its ant landscape.


Field Summary
 
Fields inherited from class com.epochx.action.Action
DO_NOTHING
 
Constructor Summary
AntTurnRightAction(Ant ant)
          Constructs an AntTurnRightAction, supplying an ant that the action can be performed on.
 
Method Summary
 void execute()
          Execute this action, which will trigger the ant to turn right from its current orientation in its ant landscape.
 java.lang.String toString()
          String representation of this action which identifies the action type.
 
Methods inherited from class com.epochx.action.AntAction
getAnt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AntTurnRightAction

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

Parameters:
ant - the Ant that will be turned right upon execution.
Method Detail

execute

public void execute()
Execute this action, which will trigger the ant to turn right from its current orientation in its ant landscape.

Specified by:
execute in class Action

toString

public java.lang.String toString()
String representation of this action which identifies the action type.

Overrides:
toString in class java.lang.Object
Returns:
string representation of this action which identifies the action type.