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 new file mode 100644 index 0000000..bf86d15 --- /dev/null +++ b/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegment.java @@ -0,0 +1,2 @@ +package uulm.teamname.marvelous.server.Lobby.pipelining;public class PauseSegment { +} diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Pipeline.java b/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Pipeline.java similarity index 100% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Pipeline.java rename to Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Pipeline.java diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Segment.java b/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Segment.java similarity index 100% rename from Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Segment.java rename to Server/src/main/java/uulm/teamname/marvelous/server/Lobby/pipelining/Segment.java 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 index 7ee0699..12ca266 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 @@ -94,8 +94,8 @@ public class LobbyConnection { } - public boolean contains(WebSocket webSocket) { - return player1 == webSocket || player2 == webSocket || spectators.contains(webSocket); + public boolean contains(Participant participant) { + return player1 == participant || player2 == participant || spectators.contains(participant); } // Methods to send events 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 index a2a3584..90adf9e 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 @@ -31,7 +31,7 @@ public class MessageRelay { } public void sendMessage (LobbyConnection origin, Participant recipient, Event[] events) { - switch (target) { + switch (recipient.type) { case Player1 -> { } 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 new file mode 100644 index 0000000..7a0e1e7 --- /dev/null +++ b/Server/src/test/java/uulm/teamname/marvelous/server/Lobby/pipelining/PauseSegmentTest.java @@ -0,0 +1,5 @@ +import static org.mockito.Mockito.*; +import static org.junit.jupiter.api.Assertions.*; +class PauseSegmentTest { + +} \ No newline at end of file