Class CreateLobbyRequest
java.lang.Object
it.polimi.ingsw.Server.Messages.Message
it.polimi.ingsw.Server.Messages.Events.Requests.ClientRequest
it.polimi.ingsw.Server.Messages.Events.Requests.CreateLobbyRequest
- All Implemented Interfaces:
ClientEvent,Serializable
Represents a Client triying to create a new
Lobby- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final intprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the maximum amount of players the lobby will havebooleanisPublic()Check if the lobby will be public
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
isPublic
private final boolean isPublic -
maxPlayers
private final int maxPlayers
-
-
Constructor Details
-
CreateLobbyRequest
public CreateLobbyRequest(boolean isPublic, int maxPlayers) Construct the request- Parameters:
isPublic- true if the lobby is supposed to be publicly available on the ServermaxPlayers- the number of maximum players the lobby will allow (no bound is set but the server will impose it)
-
-
Method Details
-
isPublic
public boolean isPublic()Check if the lobby will be public- Returns:
- true if the lobby will be public, false otherwise
-
getMaxPlayers
public int getMaxPlayers()Get the maximum amount of players the lobby will have- Returns:
- the maximum amount of players the lobby will have
-