From 6b102878088be91b1d105e0c2a2a664b152e5c66 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Mon, 7 Jun 2021 16:44:29 +0200 Subject: [PATCH] refactor: more class name changes --- .../teamname/marvelous/server/lobby/TurnTimeoutTimer.java | 8 ++++---- .../server/lobby/pipelining/GameLogicSegment.java | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TurnTimeoutTimer.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TurnTimeoutTimer.java index a5940ae..edcc210 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TurnTimeoutTimer.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/TurnTimeoutTimer.java @@ -9,21 +9,21 @@ import java.util.concurrent.*; import java.util.function.Consumer; /** - * The {@link TimeoutTimer} class is called by the {@link Lobby} to limit the amount of time a player has per round. + * The {@link TurnTimeoutTimer} class is called by the {@link Lobby} to limit the amount of time a player has per round. */ -public class TimeoutTimer { +public class TurnTimeoutTimer { private final ScheduledExecutorService timer; private final Consumer callback; private final int maxRoundTime; private ScheduledFuture current; - public TimeoutTimer(int maxRoundTime, Consumer callback) { + public TurnTimeoutTimer(int maxRoundTime, Consumer callback) { String lobbyThreadName = Thread.currentThread().getName(); ThreadFactory threadFactory = new ThreadFactory() { @Override public Thread newThread(Runnable r) { - return new Thread(r, lobbyThreadName + "-timerThread"); + return new Thread(r, lobbyThreadName + "-TurnTimerThread"); } }; this.timer = Executors.newSingleThreadScheduledExecutor(threadFactory); diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/GameLogicSegment.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/GameLogicSegment.java index da3a5b7..b87e295 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/GameLogicSegment.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/GameLogicSegment.java @@ -5,21 +5,19 @@ import uulm.teamname.marvelous.gamelibrary.events.Event; import uulm.teamname.marvelous.gamelibrary.events.EventBuilder; import uulm.teamname.marvelous.gamelibrary.gamelogic.GameInstance; import uulm.teamname.marvelous.gamelibrary.requests.Request; -import uulm.teamname.marvelous.gamelibrary.requests.RequestType; -import uulm.teamname.marvelous.server.lobby.Lobby; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; /** - * The {@link GameStateSegment} handles all {@link GameInstance game} relevant {@link Request Requests}. Therefore it + * The {@link GameLogicSegment} handles all {@link GameInstance game} relevant {@link Request Requests}. Therefore it * updates the game with the matching request. */ -public class GameStateSegment implements Segment { +public class GameLogicSegment implements Segment { private GameInstance game; - public GameStateSegment(GameInstance game) { + public GameLogicSegment(GameInstance game) { this.game = game; }