mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Prøver å fjerne exception produsert fordi vi endrer en liste som vi looper igjennom del 2
This commit is contained in:
parent
6d0c1a719f
commit
ffceabd50c
@ -762,7 +762,7 @@ public class Board {
|
|||||||
* Kills all robots that have taken too much damage
|
* Kills all robots that have taken too much damage
|
||||||
*/
|
*/
|
||||||
private void killAllHeavilyDamagedRobots() {
|
private void killAllHeavilyDamagedRobots() {
|
||||||
Collection<Robot> robotList = robots.values();
|
List<Robot> robotList = new ArrayList<>(robots.values());
|
||||||
for (Robot robot : robotList) {
|
for (Robot robot : robotList) {
|
||||||
if (robot.getDamageTaken() >= 10) {
|
if (robot.getDamageTaken() >= 10) {
|
||||||
killRobot(robot);
|
killRobot(robot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user