uk.ac.nott.cs.g54dia.library
Interface Action

All Known Implementing Classes:
DeliverWaterAction, LoadWaterAction, MoveAction, MoveTowardsAction, RefuelAction

public interface Action

Interface implemented by all actions.

Each tanker is required to return a single instance of an implementation of this interface at each cycle (via the senseAndAct method of the Tanker class). This action contains the actual code to allow the Tanker to do work.


Method Summary
 void execute(Environment env, Tanker tanker)
          Execute the action for this Tanker in this Environment.
 

Method Detail

execute

void execute(Environment env,
             Tanker tanker)
             throws ActionFailedException
Execute the action for this Tanker in this Environment.

Parameters:
tanker - The Tanker trying to perform this action.
env - The Environment that the Tanker inhabits.
Throws:
ActionFailedException - The action couldn't be performed.