From 6eff0a48133531f771ad17e8b50c488ff03f9d47 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Sun, 6 Jun 2021 00:08:08 +0200 Subject: [PATCH] refactor: extracted updateTimer method --- .../java/uulm/teamname/marvelous/server/lobby/Lobby.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java index 70269f7..c8d0933 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java @@ -92,8 +92,11 @@ public class Lobby { badRequests = 0; } + updateTimer(game.state.getActiveCharacter().type); - EntityType currentActiveCharacterType = game.state.getActiveCharacter().type; + } + + void updateTimer(EntityType currentActiveCharacterType) { if (pauseSegment.isPaused()) { turnTimer.clear(); } else if (currentActiveCharacterType == EntityType.P1) {