fix: fixed types in MessageRelay and LobbyConnection

This commit is contained in:
Yannik Bretschneider 2021-05-19 20:59:11 +02:00
parent fcf43fcd83
commit d2d9712b61
6 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,2 @@
package uulm.teamname.marvelous.server.Lobby.pipelining;public class PauseSegment {
}

View File

@ -94,8 +94,8 @@ public class LobbyConnection {
} }
public boolean contains(WebSocket webSocket) { public boolean contains(Participant participant) {
return player1 == webSocket || player2 == webSocket || spectators.contains(webSocket); return player1 == participant || player2 == participant || spectators.contains(participant);
} }
// Methods to send events // Methods to send events

View File

@ -31,7 +31,7 @@ public class MessageRelay {
} }
public void sendMessage (LobbyConnection origin, Participant recipient, Event[] events) { public void sendMessage (LobbyConnection origin, Participant recipient, Event[] events) {
switch (target) { switch (recipient.type) {
case Player1 -> { case Player1 -> {
} }

View File

@ -0,0 +1,5 @@
import static org.mockito.Mockito.*;
import static org.junit.jupiter.api.Assertions.*;
class PauseSegmentTest {
}