mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
cheaks if all player are dead and then exits game
This commit is contained in:
parent
fd7a0f5bc3
commit
4fe0439297
@ -306,6 +306,11 @@ public class RoboRallyGame implements DrawableGame, InteractableGame {
|
||||
if (host) {
|
||||
server.setDeadPlayers(gameBoard.getRealDeadRobots());
|
||||
}
|
||||
playerList.removeIf((player) -> gameBoard.getRealDeadRobots().contains(player.getRobotID()));
|
||||
if(playerList.isEmpty()){
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user