|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.nott.cs.g54dia.library.MoveTowardsAction
public class MoveTowardsAction
Action which moves the tanker towards a given Point
in the environment.
Field Summary | |
---|---|
private Point |
target
|
Constructor Summary | |
---|---|
MoveTowardsAction(Point t)
|
Method Summary | |
---|---|
void |
execute(Environment env,
Tanker tanker)
Execute the action for this Tanker in this Environment. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Point target
Constructor Detail |
---|
public MoveTowardsAction(Point t)
Method Detail |
---|
public void execute(Environment env, Tanker tanker) throws ActionFailedException
Action
execute
in interface Action
env
- The Environment that the Tanker inhabits.tanker
- The Tanker trying to perform this action.
ActionFailedException
- The action couldn't be performed.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |