mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-07-27 02:05:26 +02:00
cheaks if all player are dead and then exits game
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user