abstract class AbstractLobby[T <: Player] extends Lobby[T]
- Alphabetic
- By Inheritance
- AbstractLobby
- Lobby
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AbstractLobby(lobbyContext: LobbyContext)
Abstract Value Members
-
abstract
def
addPlayer(player: T): Unit
Adds a new player.
-
abstract
def
addPlayers(players: T*): Unit
Adds new players.
-
abstract
def
getPlayer(username: String): Option[T]
Gets a player.
Gets a player.
- username
The username of the player to get
- returns
The player if it's found, otherwise none.
- Definition Classes
- Lobby
-
abstract
def
getPlayers: Seq[T]
Gets all players.
-
abstract
def
removePlayer(username: String): Unit
Removes a player.
Concrete Value Members
-
def
clear(): Unit
Clears this instance.
Clears this instance.
- Definition Classes
- Lobby
-
def
isFull: Boolean
Defines if the lobby is full or not.
Defines if the lobby is full or not.
- returns
True if the lobby is full; otherwise false.
- Definition Classes
- Lobby
-
def
notifyGameStarted(levelContext: MultiPlayerLevelContext, levelInfo: LevelInfo): Unit
Notify to lobby context that the game is started passing the context of the level to play.
Notify to lobby context that the game is started passing the context of the level to play.
- levelContext
The level context.
- levelInfo
The level info.
-
def
notifyLobbyClosed(byUser: Boolean = true): Unit
Notify to lobby context that the lobby have been closed.
Notify to lobby context that the lobby have been closed.
- byUser
If the lobby have been closed by the user or not (optional, default true).
-
def
notifyUserAdded(user: User): Unit
Notify the lobby context that a new user have been added to the lobby.
Notify the lobby context that a new user have been added to the lobby.
- user
The user.
-
def
notifyUserRemoved(user: User): Unit
Notify the lobby context that a user have been removed from the lobby.
Notify the lobby context that a user have been removed from the lobby.
- user
The user.