mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Liste med døde spiller lagt til i Board
This commit is contained in:
parent
e8f1c16caa
commit
c684630b04
@ -23,6 +23,7 @@ public class Board {
|
||||
private IGrid<Particle> particles;
|
||||
private Map<RobotID, Robot> robots;
|
||||
private List<Robot> deadRobots;
|
||||
private List<Robot> realDeadRobots;
|
||||
|
||||
/**
|
||||
* Initializes the board
|
||||
@ -47,8 +48,15 @@ public class Board {
|
||||
this.tiles = tiles;
|
||||
this.particles = new Grid<>(tiles.getWidth(), tiles.getHeight());
|
||||
this.deadRobots = new ArrayList<>();
|
||||
this.realDeadRobots = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* All the Real dead player's robots.
|
||||
* @return A list of Robots.
|
||||
*/
|
||||
public List<Robot> getRealDeadRobots() { return realDeadRobots; }
|
||||
|
||||
/**
|
||||
* Gets the height of the board
|
||||
* @return The height of the board
|
||||
@ -349,6 +357,9 @@ public class Board {
|
||||
robot.setDamageTaken(2);
|
||||
robots.put(robot.getRobotId(), robot);
|
||||
}
|
||||
else {
|
||||
realDeadRobots.add(robot);
|
||||
}
|
||||
}
|
||||
deadRobots = new ArrayList<>();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user