MCPcopy Create free account
hub / github.com/catabriga/graphwar / finishGame

Method finishGame

src/GraphServer/GraphServer.java:979–1011  ·  view source on GitHub ↗
(ClientConnection client)

Source from the content-addressed store, hash-verified

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 {

Callers 1

handleMessageMethod · 0.95

Calls 6

setFinishedMethod · 0.95
isFinishedMethod · 0.95
setSkipLevelMethod · 0.95
setEveryoneNotReadyMethod · 0.95
sendMessageAllMethod · 0.95
goPreGameMethod · 0.95

Tested by

no test coverage detected