|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Move
The Move class represents a move made by the robot on a map. It contains the direction that was moved and whether or not a crate was moved or incinerated during that move.
Constructor Summary | |
Move(Direction dir,
boolean crate,
boolean incinerated,
boolean moved)
Constructor for the Move Class |
Method Summary | |
Direction |
getDirection()
Returns the direction of the move that just occured. |
boolean |
hasCrateMoved()
Returns whether or not the crate was moved in the move. |
boolean |
hasRobotMoved()
Returns whether or not the robot was moved in the move. |
void |
setCrateMoved(boolean moved)
Sets whether or not a crate was moved in the move. |
void |
setDirection(Direction dir)
Sets the direction that the robot moved. |
void |
setIncinerated(boolean incinerated)
Sets whether or not a crate was incinerated on a move. |
void |
setRobotMoved(boolean moved)
Sets whether or not a robot was moved in the move. |
boolean |
wasIncinerated()
Returns whether or not the crate was incinerated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Move(Direction dir, boolean crate, boolean incinerated, boolean moved)
dir
- The direction of the movecrate
- Whether or not a crate was movedincinerated
- Whether or not a crate was movedMethod Detail |
public Direction getDirection()
public void setDirection(Direction dir)
dir
- The direction of the movepublic boolean hasCrateMoved()
public void setCrateMoved(boolean moved)
moved
- True if crate was moved
False otherwisepublic boolean wasIncinerated()
public void setIncinerated(boolean incinerated)
incinerated
- True if crate was incinerated
False otherwisepublic boolean hasRobotMoved()
public void setRobotMoved(boolean moved)
moved
- True if robot was moved
False otherwise
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |