Updated 'LobbyAcceptMessage' class.
Updated the 'LobbyAcceptMessage' class by adding the 'host' attribute and its getter method to it.
This commit is contained in:
@@ -7,13 +7,39 @@
|
||||
*/
|
||||
@Serializable
|
||||
public class LobbyAcceptMessage extends ServerMessage {
|
||||
/**
|
||||
* Create LobbyAcceptMessage attributes.
|
||||
*/
|
||||
private final int host;
|
||||
|
||||
/**
|
||||
* Constructs a new LobbyAccept instance.
|
||||
*/
|
||||
public LobbyAcceptMessage() {
|
||||
super();
|
||||
this.host = -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param host as the id of the host as an Integer.
|
||||
*/
|
||||
public LobbyAcceptMessage(int host) {
|
||||
super();
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be used return host attribute of LobbyAcceptMessage class.
|
||||
*
|
||||
* @return host as an Integer.
|
||||
*/
|
||||
public int getHost() {
|
||||
return this.host;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Accepts a visitor to process this message.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user