|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RobotSuccessPercept
A percept indicating whether the last attempted action was successful or not, and if not, why.
Apart from the initial percept of starting location, this will be the only type of percept your robot receives. The percept is a simple indication of success or failure of the last attempted action. If the action succeeded, you can assume that your robot successfully changed position. If the action failed, you can obtain additional information about why (due to hitting an obstacle, or hitting the boundary of the room, or if an illegal action was attempted). An action is illegal if, for example, it attempts to move west 3 squares, when moves of only 1 square at a time are allowed.
Nested Class Summary | |
---|---|
static class |
RobotSuccessPercept.ReasonForFailure
Indicates the reason for the failure of an attempted move. |
Method Summary | |
---|---|
RobotSuccessPercept.ReasonForFailure |
getReasonForFailure()
Indicates the reason for the failure of an attempted move. |
java.lang.Boolean |
wasSuccessful()
Indicates whether the last action attempted by the robot was successful or not. |
Method Detail |
---|
java.lang.Boolean wasSuccessful()
RobotSuccessPercept.ReasonForFailure getReasonForFailure()
Should return null if the move was *not* a failure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |