public class Robot
extends java.lang.Object
| Constructor and Description | 
|---|
Robot(RobotID robotId,
     Position spawnPosition)
Instantiates a new robot 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Robot | 
copy()
Makes a copy of this robot with the same properties as this robot 
 | 
int | 
getAmountOfLives()
Gets the amount of life a robot has left. 
 | 
Position | 
getBackupPosition()
Gets the robot's backup position 
 | 
int | 
getDamageTaken()
Gets the damage the robot has taken 
 | 
Direction | 
getFacingDirection()
Gets the direction the robot is currently facing 
 | 
int | 
getLastFlagVisited()
Gets the last flag the robot visited 
 | 
Position | 
getPosition()
Gets the robot's current position on the board 
 | 
RobotID | 
getRobotId()
Gets the robot ID 
 | 
boolean | 
hasTouchedFlagThisTurn()
True if the robot has touched a flag in the current turn 
 | 
java.lang.Boolean | 
isInPowerDown()
Gets the robot's power-down status 
 | 
void | 
setAmountOfLives(int amountOfLives)
Sets the amount if life the robot has left 
 | 
void | 
setBackupPosition(Position backupPosition)
Sets the backup position of the robot 
 | 
void | 
setDamageTaken(int damage)
Sets the robot's taken damage to a given amount 
 | 
void | 
setFacingDirection(Direction newFacingDirection)
Sets the direction the robot is currently facing 
 | 
void | 
setHasTouchedFlagThisTurn(boolean hasTouchedFlagThisTurn)
Sets the boolean value to true if the robot touches a flag during a turn,
 and false at the end of each turn. 
 | 
void | 
setLastFlagVisited(int currentFlag)
Set the robot's last visited flag to the new flag and places its backup on the flag's position 
 | 
void | 
setPosition(Position newPosition)
Sets the robot's current position on the board 
 | 
void | 
setPowerDown(java.lang.Boolean powerDownStatus)
Sets power-down status 
 | 
public boolean hasTouchedFlagThisTurn()
public void setHasTouchedFlagThisTurn(boolean hasTouchedFlagThisTurn)
hasTouchedFlagThisTurn - the boolean value to be set.public int getDamageTaken()
public void setDamageTaken(int damage)
damage - The amount of damage the robot has receivedpublic Position getPosition()
public void setPosition(Position newPosition)
newPosition - The new position of the robotpublic void setPowerDown(java.lang.Boolean powerDownStatus)
powerDownStatus - Whether the robot is currently in power-downpublic java.lang.Boolean isInPowerDown()
public int getLastFlagVisited()
public void setLastFlagVisited(int currentFlag)
currentFlag - The flag the robot is standing onpublic Position getBackupPosition()
public void setBackupPosition(Position backupPosition)
backupPosition - The new backup position of the robotpublic RobotID getRobotId()
public Direction getFacingDirection()
public void setFacingDirection(Direction newFacingDirection)
newFacingDirection - The new direction the robot should be facingpublic int getAmountOfLives()
public void setAmountOfLives(int amountOfLives)
amountOfLives - the new amount if lives the robot has leftpublic Robot copy()