From ab4e9aa42c86c0303fcc5d4ca7700c54b71391c4 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Sat, 5 Jun 2021 16:47:57 +0200 Subject: [PATCH] feat: added name to Participant --- .../teamname/marvelous/server/lobbymanager/Participant.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 1fe0747..cfe9078 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 @@ -10,6 +10,8 @@ public class Participant { /** The Websocket to contact the participant with */ private WebSocket connection; + public final String name; + /** The type (as in role) of participant */ public final ParticipantType type; @@ -17,10 +19,11 @@ public class Participant { public final boolean AI; /** Creates a new {@link Participant} */ - public Participant (WebSocket connection, ParticipantType type, boolean AI) { + public Participant (WebSocket connection, ParticipantType type, boolean AI, String name) { this.connection = connection; this.type = type; this.AI = AI; + this.name = name; } /** Returns the {@link WebSocket} to contact the participant with */