Package blockly_robot.robot.logic.log
Class Movement
java.lang.Object
blockly_robot.robot.logic.log.Action
blockly_robot.robot.logic.log.Movement
Represents a movement made by a robot.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMovement(String name, VirtualRobot robot) Constructs a Movement object with the specified name and robot. -
Method Summary
Modifier and TypeMethodDescriptiongetName()getNext()intgetTo()booleanhasNext()booleansetError(ErrorMessages error) voidsetTo()Sets the 'to' location of the movement and calculates the relocation and rotation values.setTo(int toRow, int toCol) toString()Returns a string representation of the Movement object.
-
Constructor Details
-
Movement
Constructs a Movement object with the specified name and robot.- Parameters:
name- the name of the movementrobot- the virtual robot
-
-
Method Details
-
getTo
-
setTo
Sets the 'to' location of the movement and calculates the relocation and rotation values.- Returns:
- the updated Movement object
-
hasNext
public boolean hasNext() -
setNext
-
getNext
-
getRotation
public int getRotation() -
setTo
-
isRelocated
public boolean isRelocated() -
setError
-
toString
Returns a string representation of the Movement object. -
getName
-