Lagd metode for å få damage fra en spesifikk robot

This commit is contained in:
GabrielMagnus 2020-03-31 14:55:52 +02:00
parent 22f91c84c2
commit 4b1bb42361

View File

@ -172,6 +172,16 @@ public class Board {
}
}
}
/**
* Get the damage of a specific robot
* @param robot The RobotID of a robot
* @return The amount of damage the robot has currently
*/
public int getRobotDamage(RobotID robot) {
return robots.get(robot).getDamageTaken();
}
/**
* Moves a robot one unit in a specified direction
* @param robotID ID of the robot to move