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

Method stopGame

src/Graphwar/GameData.java:1381–1407  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1379 }
1380
1381 public void stopGame()
1382 {
1383 this.gameState = Constants.NONE;
1384 //this.players = new ArrayList<Player>();
1385 this.serverConnection = null;
1386 this.drawingFunction = false;
1387 this.exploding = false;
1388 this.nextTurnSent = false;
1389 this.leader = false;
1390
1391 stopComputers();
1392
1393 ((GlobalScreen)graphwar.getUI().getScreen(Constants.GLOBAL_ROOM_SCREEN)).refreshGameButton();
1394 ((PreGameScreen)graphwar.getUI().getScreen(Constants.PRE_GAME_SCREEN)).restartScreen();
1395
1396
1397 if(graphwar.getGlobalClient().isRunning())
1398 {
1399 graphwar.getUI().setScreen(Constants.GLOBAL_ROOM_SCREEN);
1400 }
1401 else
1402 {
1403 graphwar.getUI().setScreen(Constants.MAIN_MENU_SCREEN);
1404 }
1405
1406 graphwar.finishGame();
1407 }
1408
1409 public void disconnectKick()
1410 {

Callers 1

disconnectMethod · 0.95

Calls 9

stopComputersMethod · 0.95
refreshGameButtonMethod · 0.80
getScreenMethod · 0.80
getUIMethod · 0.80
restartScreenMethod · 0.80
getGlobalClientMethod · 0.80
setScreenMethod · 0.80
isRunningMethod · 0.45
finishGameMethod · 0.45

Tested by

no test coverage detected