Fix: public attribute are now private with getter/setter, useless synchronized removed

This commit is contained in:
2026-06-10 16:07:24 +02:00
parent e45a5bbb98
commit 709d1743d0
12 changed files with 63 additions and 64 deletions
@@ -282,7 +282,7 @@ public class GameEventProcessor {
synchronized (gameController) {
gameController.endGameForFeit();
EndedGame forfeitEnd = new EndedGame(
game.getSlotMap(), game.orderLogicCard,
game.getSlotMap(), game.getOrderLogicCard(),
game.getCurrentState(), game.getPlayerStanding()
);
broadcaster.notifyAll(forfeitEnd);
@@ -313,7 +313,7 @@ public class GameEventProcessor {
broadcaster.notifyAll(event);
if (game.getCurrentState().getRound() != roundBefore) {
ApplyNextRound nextRound = new ApplyNextRound(
game.getSlotMap(), game.orderLogicCard, game.getCurrentState(),
game.getSlotMap(), game.getOrderLogicCard(), game.getCurrentState(),
game.getPlayers(),
game.getUpperListTribeCards(), game.getLowerListTribeCards(),
game.getUpperListBuilding(), game.getLowerListBuilding()
@@ -321,7 +321,7 @@ public class GameEventProcessor {
broadcaster.notifyAll(nextRound);
} else if (game.getCurrentState().getGameStage() == GameStages.ENDED) {
EndedGame endedGame = new EndedGame(
game.getSlotMap(), game.orderLogicCard,
game.getSlotMap(), game.getOrderLogicCard(),
game.getCurrentState(), game.getPlayerStanding()
);
broadcaster.notifyAll(endedGame);
@@ -349,7 +349,7 @@ public class GameEventProcessor {
* @return a new {@link ArrayList} of disconnected usernames.
*/
private ArrayList<String> buildDisconnectedList(Game game) {
return game.disconnetedPlayers.entrySet().stream()
return game.disconnectedPlayers.entrySet().stream()
.filter(Map.Entry::getValue)
.map(e -> e.getKey().getUserName())
.collect(Collectors.toCollection(ArrayList::new));