|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
void execute(Environment env, Tanker tanker) throws ActionFailedException
tanker
- The Tanker trying to perform this action.env
- The Environment that the Tanker inhabits.
ActionFailedException
- The action couldn't be performed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |