|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPER.rover.FindRockAction
An action to search for a rock intelligently. If the rover had to stop early because it detected an obstacle, the scan will cover a smaller range. If the first scan, which only looks short
| Constructor Summary | |
FindRockAction(boolean obstacleDetected)
FindRockAction constructor |
|
| Method Summary | |
int |
closestReading()
Gives you the minimum rock distance in cm. |
boolean |
doAction(Rover r)
Tries to start the action. |
long |
getImageUpdateTime()
This action does not take pictures so getImageUpdateTime() will
always return 0. |
int |
getMaxRockAngle()
Gives you the maximum angle at which the rock was found |
int |
getMinRockAngle()
Gives you the minimum angle at which the rock was found |
java.awt.image.BufferedImage |
getRecentImage()
This action does not take pictures so getRecentImage() will
always return null. |
int |
getReturnValue()
The return value of the Action. |
int |
getRockAngle()
Getter for property rockAngle. |
int |
getRockDist()
Getter for property rockDist. |
java.lang.String |
getShortSummary()
Provides a shortened version of the summary returned by getSummary. |
java.lang.String |
getSummary()
Provides a textual explanation of the Action, such as "turn 90 degrees" |
int |
getTime()
How long the action will take, in milliseconds. |
int |
getTimeRemaining()
How much time until the action finishes (in milliseconds), if it has already started. |
boolean |
hasFoundRock()
Tells you whether the FindRockAction found a rock |
boolean |
isCompleted()
Whether the action has completed. |
boolean |
isSuccess()
Tells you whether the Action completed successfully. |
void |
kill()
this action can't currently be killed |
int |
moveFromRock(Rover rov,
int turnAngle)
If the rover is near a rock and will turn into it, this function should make it so that the rover won't hit the rock |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FindRockAction(boolean obstacleDetected)
obstacleDetected - should be set to true if the rover stopped early
because of a detected obstacle.| Method Detail |
public boolean doAction(Rover r)
Action
doAction in interface Actionpublic int getReturnValue()
Action
getReturnValue in interface ActionRoverState,
ActionConstantspublic java.lang.String getShortSummary()
Action
getShortSummary in interface Actionpublic java.lang.String getSummary()
Action
getSummary in interface Actionpublic int getTime()
Action
getTime in interface Actionpublic int getTimeRemaining()
Action
getTimeRemaining in interface Actionpublic boolean isCompleted()
Action
isCompleted in interface Actionpublic boolean isSuccess()
isSuccess in interface Actionpublic void kill()
kill in interface Actionpublic boolean hasFoundRock()
public int getRockAngle()
public int getRockDist()
public int getMinRockAngle()
public int getMaxRockAngle()
public int closestReading()
public int moveFromRock(Rover rov,
int turnAngle)
rov - An active instantion of a RoverturnAngle - the angle that the rover is about to turnpublic long getImageUpdateTime()
getImageUpdateTime() will
always return 0.
getImageUpdateTime in interface Actionpublic java.awt.image.BufferedImage getRecentImage()
getRecentImage() will
always return null.
getRecentImage in interface Action
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||