mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Legger til en funksjon for å få alle levende roboter fra Board
This commit is contained in:
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user