Refactor of network stack
This commit is contained in:
@@ -280,12 +280,11 @@ public class GameEventProcessor {
|
||||
*/
|
||||
private void endGameForFeit(Game game) {
|
||||
synchronized (gameController) {
|
||||
gameController.EndGameForFeit();
|
||||
gameController.endGameForFeit();
|
||||
EndedGame forfeitEnd = new EndedGame(
|
||||
game.getSlotMap(), game.orderLogicCard,
|
||||
game.getCurrentState(), game.getPlayerStanding()
|
||||
);
|
||||
forfeitEnd.setDisconnected(buildDisconnectedList(game));
|
||||
broadcaster.notifyAll(forfeitEnd);
|
||||
System.out.println("Timer expired: no player reconnected in 60 s.");
|
||||
removeOfflinePlayers();
|
||||
@@ -319,14 +318,12 @@ public class GameEventProcessor {
|
||||
game.getUpperListTribeCards(), game.getLowerListTribeCards(),
|
||||
game.getUpperListBuilding(), game.getLowerListBuilding()
|
||||
);
|
||||
nextRound.setDisconnected(buildDisconnectedList(game));
|
||||
broadcaster.notifyAll(nextRound);
|
||||
} else if (game.getCurrentState().getGameStage() == GameStages.ENDED) {
|
||||
EndedGame endedGame = new EndedGame(
|
||||
game.getSlotMap(), game.orderLogicCard,
|
||||
game.getCurrentState(), game.getPlayerStanding()
|
||||
);
|
||||
endedGame.setDisconnected(buildDisconnectedList(game));
|
||||
broadcaster.notifyAll(endedGame);
|
||||
if (!saveManager.delete()) {
|
||||
System.out.println("\n!!! Couldn't delete save !!!\n");
|
||||
|
||||
Reference in New Issue
Block a user