(String[] info)
| 1097 | } |
| 1098 | |
| 1099 | private void finishGameMessage(String[] info) throws Exception |
| 1100 | { |
| 1101 | this.gameState = Constants.PRE_GAME; |
| 1102 | |
| 1103 | this.drawingFunction = false; |
| 1104 | this.exploding = false; |
| 1105 | this.nextTurnSent = false; |
| 1106 | |
| 1107 | stopComputers(); |
| 1108 | |
| 1109 | ((GameScreen)graphwar.getUI().getScreen(Constants.GAME_SCREEN)).stopPanel(); |
| 1110 | Thread.sleep(200); //This should be enough so that the game is not being painted when players are removed |
| 1111 | |
| 1112 | ListIterator<Player> itr = players.listIterator(); |
| 1113 | |
| 1114 | while(itr.hasNext()) |
| 1115 | { |
| 1116 | Player player = itr.next(); |
| 1117 | |
| 1118 | Soldier[] soldiers = player.getSoldiers(); |
| 1119 | |
| 1120 | for(int i=0; i<soldiers.length; i++) |
| 1121 | { |
| 1122 | if(soldiers[i].isAlive()) |
| 1123 | { |
| 1124 | ((PreGameScreen)graphwar.getUI().getScreen(Constants.PRE_GAME_SCREEN)).addChat(null, player.getName()+" won the game."); |
| 1125 | break; |
| 1126 | } |
| 1127 | } |
| 1128 | |
| 1129 | } |
| 1130 | |
| 1131 | removeDisconnectedPlayers(); |
| 1132 | |
| 1133 | updateReadyButton(); |
| 1134 | graphwar.getUI().setScreen(Constants.PRE_GAME_SCREEN); |
| 1135 | graphwar.getGlobalClient().recreateRoom(); |
| 1136 | } |
| 1137 | |
| 1138 | private void setAngleMessage(String[] info) throws Exception |
| 1139 | { |
no test coverage detected