java.lang.Object
it.polimi.ingsw.Server.Messages.ServerResponses.SupportStructures.LobbyInfo
All Implemented Interfaces:
Serializable

public class LobbyInfo extends Object implements Serializable
Information about a Lobby to be shared with clients
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • admin

      private final String admin
    • ID

      private final UUID ID
    • isPublic

      private final boolean isPublic
    • maxPlayers

      private final int maxPlayers
    • players

      private final List<String> players
  • Constructor Details

    • LobbyInfo

      public LobbyInfo(Lobby lobby)
      Generate the lobby info
      Parameters:
      lobby - the lobby to get the info of
  • Method Details

    • getAdmin

      public String getAdmin()
      Get the admin nickname
      Returns:
      the admin nickname
    • getID

      public UUID getID()
      Get the UUID of the Lobby
      Returns:
      the UUID of the Lobby
    • isPublic

      public boolean isPublic()
      Check if the Lobby is public
      Returns:
      true if the lobby is public
    • getMaxPlayers

      public int getMaxPlayers()
      Get the maximum amount of players allowed in the lobby
      Returns:
      the max size of the lobby
    • getPlayers

      public List<String> getPlayers()
      Get connected player nicknames
      Returns:
      an Unmodifiable List containing the connected players