1
0
mirror of https://github.com/inf112-v20/Fiasko.git synced 2025-03-03 00:29:45 +01:00

Legger til en funksjon for å få alle levende roboter fra Board

This commit is contained in:
Kristian Knarvik 2020-02-23 20:26:11 +01:00
parent 232e28aed0
commit fbbfed1932

@ -73,6 +73,14 @@ public class Board {
deadRobots = new ArrayList<>(); deadRobots = new ArrayList<>();
} }
/**
* Gets all alive robots from the board
* @return A list of alive robots
*/
public List<Robot> getAliveRobots() {
return new ArrayList<>(robots.values());
}
/** /**
* Removes a dead robot from the board over to the dead robot list * Removes a dead robot from the board over to the dead robot list
* @param robot the dead robot * @param robot the dead robot