merge dev into test #30
@@ -19,16 +19,23 @@ public class LobbyPlayerJoinedMessage extends ServerMessage {
|
||||
*/
|
||||
private final int id;
|
||||
|
||||
/**
|
||||
* The flag is the new player is the host
|
||||
*/
|
||||
private final boolean host;
|
||||
|
||||
/**
|
||||
* Constructs a new LobbyPlayerJoin instance with the specified player name.
|
||||
*
|
||||
* @param player the player joining the lobby
|
||||
* @param id the id of the player
|
||||
* @param id the id of the player
|
||||
* @param host as the flag if the player is the host as a Boolean.
|
||||
*/
|
||||
public LobbyPlayerJoinedMessage(int id, Player player) {
|
||||
public LobbyPlayerJoinedMessage(int id, Player player, boolean host) {
|
||||
super();
|
||||
this.player = player;
|
||||
this.id = id;
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,6 +44,7 @@ public LobbyPlayerJoinedMessage(int id, Player player) {
|
||||
private LobbyPlayerJoinedMessage() {
|
||||
player = null;
|
||||
id = 0;
|
||||
host = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,6 +65,10 @@ public int getId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
public boolean isHost() {
|
||||
return this.host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts a visitor to process this message.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user