(ClientConnection client)
| 977 | } |
| 978 | |
| 979 | protected void finishGame(ClientConnection client) |
| 980 | { |
| 981 | client.setFinished(true); |
| 982 | |
| 983 | ListIterator<ClientConnection> itr = clients.listIterator(); |
| 984 | |
| 985 | while(itr.hasNext()) |
| 986 | { |
| 987 | ClientConnection tempClient = itr.next(); |
| 988 | |
| 989 | if(tempClient.isFinished()==false) |
| 990 | { |
| 991 | return; |
| 992 | } |
| 993 | } |
| 994 | |
| 995 | //Everyone finished by here |
| 996 | itr = clients.listIterator(); |
| 997 | |
| 998 | while(itr.hasNext()) |
| 999 | { |
| 1000 | ClientConnection tempClient = itr.next(); |
| 1001 | |
| 1002 | tempClient.setFinished(false); |
| 1003 | tempClient.setSkipLevel(false); |
| 1004 | } |
| 1005 | |
| 1006 | setEveryoneNotReady(); |
| 1007 | String message = NetworkProtocol.GAME_FINISHED+""; |
| 1008 | sendMessageAll(message); |
| 1009 | |
| 1010 | goPreGame(); |
| 1011 | } |
| 1012 | |
| 1013 | protected void goPreGame() |
| 1014 | { |
no test coverage detected