merge dev into test #30

Merged
j23f0712 merged 45 commits from development into dev/test 2024-12-02 01:29:40 +01:00
26 changed files with 218 additions and 85 deletions
Showing only changes of commit ea6431faa4 - Show all commits

View File

@@ -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.
*