feat: added name to Participant

This commit is contained in:
Yannik Bretschneider 2021-06-05 16:47:57 +02:00
parent e318b02db7
commit ab4e9aa42c

View File

@ -10,6 +10,8 @@ public class Participant {
/** The Websocket to contact the participant with */ /** The Websocket to contact the participant with */
private WebSocket connection; private WebSocket connection;
public final String name;
/** The type (as in role) of participant */ /** The type (as in role) of participant */
public final ParticipantType type; public final ParticipantType type;
@ -17,10 +19,11 @@ public class Participant {
public final boolean AI; public final boolean AI;
/** Creates a new {@link Participant} */ /** 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.connection = connection;
this.type = type; this.type = type;
this.AI = AI; this.AI = AI;
this.name = name;
} }
/** Returns the {@link WebSocket} to contact the participant with */ /** Returns the {@link WebSocket} to contact the participant with */