From c684630b04ae557685ef3f4a0a459db5deb33373 Mon Sep 17 00:00:00 2001 From: Steinar Aalstad Lillesund Date: Tue, 14 Apr 2020 14:54:15 +0200 Subject: [PATCH] =?UTF-8?q?Liste=20med=20d=C3=B8de=20spiller=20lagt=20til?= =?UTF-8?q?=20i=20Board?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/inf112/fiasko/roborally/objects/Board.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/inf112/fiasko/roborally/objects/Board.java b/src/main/java/inf112/fiasko/roborally/objects/Board.java index e4e9051..7f6eb46 100644 --- a/src/main/java/inf112/fiasko/roborally/objects/Board.java +++ b/src/main/java/inf112/fiasko/roborally/objects/Board.java @@ -23,6 +23,7 @@ public class Board { private IGrid particles; private Map robots; private List deadRobots; + private List 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 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<>(); }