From 30a8a03eb2c3b6f9d29324bd74c8200d3ab15bd5 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Wed, 2 Jun 2021 17:01:59 +0200 Subject: [PATCH] fix: fixed problems arising from Gamelib refactor --- Gamelib | 2 +- .../uulm/teamname/marvelous/server/ParticipantType.java | 9 +++++++++ .../java/uulm/teamname/marvelous/server/lobby/Lobby.java | 9 ++++----- .../server/lobby/pipelining/DisconnectSegment.java | 2 +- .../marvelous/server/lobbymanager/Participant.java | 2 +- 5 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 Server/src/main/java/uulm/teamname/marvelous/server/ParticipantType.java diff --git a/Gamelib b/Gamelib index 0572450..19f6695 160000 --- a/Gamelib +++ b/Gamelib @@ -1 +1 @@ -Subproject commit 0572450ced119f18a11363e02356d9afe1d880a7 +Subproject commit 19f6695ba8f25fcd8223eec3bf350ff67ae5399d diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/ParticipantType.java b/Server/src/main/java/uulm/teamname/marvelous/server/ParticipantType.java new file mode 100644 index 0000000..7d614e5 --- /dev/null +++ b/Server/src/main/java/uulm/teamname/marvelous/server/ParticipantType.java @@ -0,0 +1,9 @@ +package uulm.teamname.marvelous.server; + +/** Specifies a participant type. */ +public enum ParticipantType { + None, + Player1, + Player2, + Spectator +} 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 400d295..10e965f 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 @@ -4,12 +4,11 @@ import uulm.teamname.marvelous.gamelibrary.IntVector2; 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.json.config.CharacterConfig; -import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig; -import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig; +import uulm.teamname.marvelous.server.ParticipantType; +import uulm.teamname.marvelous.gamelibrary.config.CharacterConfig; +import uulm.teamname.marvelous.gamelibrary.config.PartyConfig; +import uulm.teamname.marvelous.gamelibrary.config.ScenarioConfig; import uulm.teamname.marvelous.gamelibrary.requests.Request; import uulm.teamname.marvelous.gamelibrary.requests.RequestType; import uulm.teamname.marvelous.server.lobby.pipelining.*; diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/DisconnectSegment.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/DisconnectSegment.java index dfae228..08b7ba9 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/DisconnectSegment.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/pipelining/DisconnectSegment.java @@ -1,7 +1,7 @@ package uulm.teamname.marvelous.server.lobby.pipelining; import uulm.teamname.marvelous.gamelibrary.events.Event; -import uulm.teamname.marvelous.gamelibrary.gamelogic.ParticipantType; +import uulm.teamname.marvelous.server.ParticipantType; import uulm.teamname.marvelous.gamelibrary.requests.RequestType; import uulm.teamname.marvelous.server.lobby.Lobby; 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 index 30f06d5..6fed4de 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,7 +1,7 @@ package uulm.teamname.marvelous.server.lobbymanager; import org.java_websocket.WebSocket; -import uulm.teamname.marvelous.gamelibrary.gamelogic.ParticipantType; +import uulm.teamname.marvelous.server.ParticipantType; import java.util.Objects;