From ae64d51a73e0fcba587453b1cdf31e1a28c2208a Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Wed, 26 May 2021 18:52:34 +0200 Subject: [PATCH] refactor: renamed package names to be lowercase --- .idea/modules.xml | 10 ++++++++++ .idea/vcs.xml | 1 + .../marvelous/server/{Lobby => lobby}/Lobby.java | 9 +++------ .../server/{Lobby => lobby}/PauseHandler.java | 2 +- .../{Lobby => lobby}/pipelining/PauseSegment.java | 3 +-- .../server/{Lobby => lobby}/pipelining/Pipeline.java | 3 +-- .../server/{Lobby => lobby}/pipelining/Segment.java | 3 +-- .../LobbyConnection.java | 6 ++---- .../{LobbyManager => lobbymanager}/MessageRelay.java | 4 +--- .../{LobbyManager => lobbymanager}/Participant.java | 2 +- .../MarvelousServer.java | 2 +- .../{Lobby => lobby}/pipelining/PauseSegmentTest.java | 5 +---- .../MarvelousServerTest.java | 3 +-- 13 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 .idea/modules.xml rename Server/src/main/java/uulm/teamname/marvelous/server/{Lobby => lobby}/Lobby.java (92%) rename Server/src/main/java/uulm/teamname/marvelous/server/{Lobby => lobby}/PauseHandler.java (88%) rename Server/src/main/java/uulm/teamname/marvelous/server/{Lobby => lobby}/pipelining/PauseSegment.java (97%) rename Server/src/main/java/uulm/teamname/marvelous/server/{Lobby => lobby}/pipelining/Pipeline.java (97%) rename Server/src/main/java/uulm/teamname/marvelous/server/{Lobby => lobby}/pipelining/Segment.java (92%) rename Server/src/main/java/uulm/teamname/marvelous/server/{LobbyManager => lobbymanager}/LobbyConnection.java (93%) rename Server/src/main/java/uulm/teamname/marvelous/server/{LobbyManager => lobbymanager}/MessageRelay.java (86%) rename Server/src/main/java/uulm/teamname/marvelous/server/{LobbyManager => lobbymanager}/Participant.java (95%) rename Server/src/main/java/uulm/teamname/marvelous/server/{NetConnector => netconnector}/MarvelousServer.java (91%) rename Server/src/test/java/uulm/teamname/marvelous/server/{Lobby => lobby}/pipelining/PauseSegmentTest.java (88%) rename Server/src/test/java/uulm/teamname/marvelous/server/{NetConnector => netconnector}/MarvelousServerTest.java (77%) diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..77e3805 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index b659007..e184830 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -3,5 +3,6 @@ + \ No newline at end of file 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 similarity index 92% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Lobby.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java index 6628539..dc3ceeb 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 @@ -1,20 +1,17 @@ -package uulm.teamname.marvelous.server.Lobby; +package uulm.teamname.marvelous.server.lobby; import uulm.teamname.marvelous.gamelibrary.IntVector2; -import uulm.teamname.marvelous.gamelibrary.entities.Entity; import uulm.teamname.marvelous.gamelibrary.entities.Character; import uulm.teamname.marvelous.gamelibrary.entities.EntityID; -import uulm.teamname.marvelous.gamelibrary.entities.EntityType; import uulm.teamname.marvelous.gamelibrary.events.Event; import uulm.teamname.marvelous.gamelibrary.events.EventBuilder; import uulm.teamname.marvelous.gamelibrary.events.EventType; import uulm.teamname.marvelous.gamelibrary.gamelogic.EventObserver; import uulm.teamname.marvelous.gamelibrary.gamelogic.GameInstance; -import uulm.teamname.marvelous.gamelibrary.gamelogic.ParticipantType; import uulm.teamname.marvelous.gamelibrary.requests.Request; import uulm.teamname.marvelous.gamelibrary.requests.RequestType; -import uulm.teamname.marvelous.server.LobbyManager.LobbyConnection; -import uulm.teamname.marvelous.server.LobbyManager.Participant; +import uulm.teamname.marvelous.server.lobbymanager.LobbyConnection; +import uulm.teamname.marvelous.server.lobbymanager.Participant; import java.util.*; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/PauseHandler.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/PauseHandler.java similarity index 88% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/PauseHandler.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobby/PauseHandler.java index fe1b982..3ce2e1b 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/PauseHandler.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/PauseHandler.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.server.Lobby; +package uulm.teamname.marvelous.server.lobby; public class PauseHandler { private boolean paused; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegment.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/PauseSegment.java similarity index 97% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegment.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/PauseSegment.java index 199a8ad..e2c5077 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegment.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/PauseSegment.java @@ -1,6 +1,5 @@ -package uulm.teamname.marvelous.server.Lobby.pipelining; +package uulm.teamname.marvelous.server.lobby.pipelining; -import uulm.teamname.marvelous.gamelibrary.Tuple; import uulm.teamname.marvelous.gamelibrary.events.Event; import uulm.teamname.marvelous.gamelibrary.events.EventBuilder; import uulm.teamname.marvelous.gamelibrary.events.EventType; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Pipeline.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Pipeline.java similarity index 97% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Pipeline.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Pipeline.java index bcfe4ff..c344b20 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Pipeline.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Pipeline.java @@ -1,6 +1,5 @@ -package uulm.teamname.marvelous.server.Lobby.pipelining; +package uulm.teamname.marvelous.server.lobby.pipelining; -import uulm.teamname.marvelous.gamelibrary.Tuple; import uulm.teamname.marvelous.gamelibrary.events.Event; import uulm.teamname.marvelous.gamelibrary.requests.Request; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Segment.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Segment.java similarity index 92% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Segment.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Segment.java index 9ca634c..202899e 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Segment.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/Segment.java @@ -1,6 +1,5 @@ -package uulm.teamname.marvelous.server.Lobby.pipelining; +package uulm.teamname.marvelous.server.lobby.pipelining; -import uulm.teamname.marvelous.gamelibrary.Tuple; import uulm.teamname.marvelous.gamelibrary.events.Event; import uulm.teamname.marvelous.gamelibrary.requests.Request; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/LobbyConnection.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyConnection.java similarity index 93% rename from Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/LobbyConnection.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyConnection.java index 12ca266..e55b653 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/LobbyConnection.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/LobbyConnection.java @@ -1,9 +1,7 @@ -package uulm.teamname.marvelous.server.LobbyManager; +package uulm.teamname.marvelous.server.lobbymanager; -import org.java_websocket.WebSocket; import uulm.teamname.marvelous.gamelibrary.events.Event; -import uulm.teamname.marvelous.gamelibrary.gamelogic.ParticipantType; -import uulm.teamname.marvelous.server.Lobby.Lobby; +import uulm.teamname.marvelous.server.lobby.Lobby; import java.util.HashSet; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/MessageRelay.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/MessageRelay.java similarity index 86% rename from Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/MessageRelay.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/MessageRelay.java index 90adf9e..4ad720c 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/MessageRelay.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/MessageRelay.java @@ -1,9 +1,7 @@ -package uulm.teamname.marvelous.server.LobbyManager; +package uulm.teamname.marvelous.server.lobbymanager; import org.java_websocket.WebSocket; import uulm.teamname.marvelous.gamelibrary.events.Event; -import uulm.teamname.marvelous.gamelibrary.gamelogic.ParticipantType; -import uulm.teamname.marvelous.server.Lobby.Lobby; import java.util.HashMap; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/Participant.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/Participant.java similarity index 95% rename from Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/Participant.java rename to Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/Participant.java index bd21e27..30f06d5 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/LobbyManager/Participant.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobbymanager/Participant.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.server.LobbyManager; +package uulm.teamname.marvelous.server.lobbymanager; import org.java_websocket.WebSocket; import uulm.teamname.marvelous.gamelibrary.gamelogic.ParticipantType; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/NetConnector/MarvelousServer.java b/Server/src/main/java/uulm/teamname/marvelous/server/netconnector/MarvelousServer.java similarity index 91% rename from Server/src/main/java/uulm/teamname/marvelous/server/NetConnector/MarvelousServer.java rename to Server/src/main/java/uulm/teamname/marvelous/server/netconnector/MarvelousServer.java index d57b46d..b908f73 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/NetConnector/MarvelousServer.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/netconnector/MarvelousServer.java @@ -1,4 +1,4 @@ -package uulm.teamname.marvelous.server.NetConnector; +package uulm.teamname.marvelous.server.netconnector; import org.java_websocket.WebSocket; import org.java_websocket.handshake.ClientHandshake; diff --git a/Server/src/test/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegmentTest.java b/Server/src/test/java/uulm/teamname/marvelous/server/lobby/pipelining/PauseSegmentTest.java similarity index 88% rename from Server/src/test/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegmentTest.java rename to Server/src/test/java/uulm/teamname/marvelous/server/lobby/pipelining/PauseSegmentTest.java index 66b5826..0758382 100644 --- a/Server/src/test/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegmentTest.java +++ b/Server/src/test/java/uulm/teamname/marvelous/server/lobby/pipelining/PauseSegmentTest.java @@ -1,12 +1,9 @@ -package uulm.teamname.marvelous.server.Lobby.pipelining; +package uulm.teamname.marvelous.server.lobby.pipelining; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.*; -import static org.mockito.Mockito.*; -import static org.junit.jupiter.api.Assertions.*; - class PauseSegmentTest { PauseSegment pauseSegment; diff --git a/Server/src/test/java/uulm/teamname/marvelous/server/NetConnector/MarvelousServerTest.java b/Server/src/test/java/uulm/teamname/marvelous/server/netconnector/MarvelousServerTest.java similarity index 77% rename from Server/src/test/java/uulm/teamname/marvelous/server/NetConnector/MarvelousServerTest.java rename to Server/src/test/java/uulm/teamname/marvelous/server/netconnector/MarvelousServerTest.java index b6c9d76..24f3752 100644 --- a/Server/src/test/java/uulm/teamname/marvelous/server/NetConnector/MarvelousServerTest.java +++ b/Server/src/test/java/uulm/teamname/marvelous/server/netconnector/MarvelousServerTest.java @@ -1,10 +1,9 @@ -package uulm.teamname.marvelous.server.NetConnector; +package uulm.teamname.marvelous.server.netconnector; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.mockito.Mockito.*; -import static org.junit.jupiter.api.Assertions.*; class MarvelousServerTest {