mirror of
				https://github.com/inf112-v20/Fiasko.git
				synced 2025-11-03 03:03:43 +01: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