Class Move

java.lang.Object
  |
  +--Move

public class Move
extends java.lang.Object

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

Move

public Move(Direction dir,
            boolean crate,
            boolean incinerated,
            boolean moved)
Constructor for the Move Class
Parameters:
dir - The direction of the move
crate - Whether or not a crate was moved
incinerated - Whether or not a crate was moved
Method Detail

getDirection

public Direction getDirection()
Returns the direction of the move that just occured.
Returns:
The direction of the move

setDirection

public void setDirection(Direction dir)
Sets the direction that the robot moved.
Parameters:
dir - The direction of the move

hasCrateMoved

public boolean hasCrateMoved()
Returns whether or not the crate was moved in the move.
Returns:
true if a crate was moved, otherwise false

setCrateMoved

public void setCrateMoved(boolean moved)
Sets whether or not a crate was moved in the move.
Parameters:
moved - True if crate was moved False otherwise

wasIncinerated

public boolean wasIncinerated()
Returns whether or not the crate was incinerated.
Returns:
true if a crate was incinerated, otherwise false

setIncinerated

public void setIncinerated(boolean incinerated)
Sets whether or not a crate was incinerated on a move.
Parameters:
incinerated - True if crate was incinerated False otherwise

hasRobotMoved

public boolean hasRobotMoved()
Returns whether or not the robot was moved in the move.
Returns:
true if a robot was moved, otherwise false

setRobotMoved

public void setRobotMoved(boolean moved)
Sets whether or not a robot was moved in the move.
Parameters:
moved - True if robot was moved False otherwise