mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-06-26 11:14:42 +02:00
Merge branch 'master' of https://github.com/inf112-v20/Fiasko
This commit is contained in:
@ -150,7 +150,7 @@ public class Board {
|
||||
*/
|
||||
public void repairRobotOnTile(RobotID robotID){
|
||||
Robot robot = robots.get(robotID);
|
||||
int newDamage =Math.max(robot.getDamageTaken()-1,0);
|
||||
int newDamage = Math.max(robot.getDamageTaken()-1,0);
|
||||
robot.setDamageTaken(newDamage);
|
||||
}
|
||||
|
||||
|
@ -463,9 +463,9 @@ public class RoboRallyGame implements IDrawableGame {
|
||||
}
|
||||
|
||||
/**
|
||||
* repair all robots standing on a reparer tile
|
||||
* repair all robots standing on a repair tile
|
||||
*/
|
||||
private void repairAllRobotsOnReparerTiles(){
|
||||
private void repairAllRobotsOnRepairTiles(){
|
||||
List<BoardElementContainer<Tile>> listOfRepareTiles = gameBoard.getPositionsOfTileOnBoard(TileType.FLAG_1,
|
||||
TileType.FLAG_2, TileType.FLAG_3, TileType.FLAG_4, TileType.WRENCH, TileType.WRENCH_AND_HAMMER);
|
||||
for (BoardElementContainer<Tile> repareTile:listOfRepareTiles) {
|
||||
@ -486,4 +486,13 @@ public class RoboRallyGame implements IDrawableGame {
|
||||
player.setPowerDownNextRound(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the powerdown status of a robots
|
||||
* @param player the player that owns the robot
|
||||
* @param powerdownStatus the powerdown status
|
||||
*/
|
||||
private void setRobotPowerDown(Player player,Boolean powerdownStatus){
|
||||
gameBoard.setPowerDown(player.getRobotID(),powerdownStatus);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user