final case class ServerImpl(username: String) extends Server with Product with Serializable
- Alphabetic
- By Inheritance
- ServerImpl
- Serializable
- Serializable
- Product
- Equals
- Server
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ServerImpl(username: String)
Type Members
-
type
ServerState = ServerState.Value
- Definition Classes
- Server
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addPlayerToLobby(actorRef: ActorRef, player: BasePlayer): Boolean
Adds a player to the lobby.
Adds a player to the lobby.
- actorRef
The actor ref.
- player
The player to add.
- returns
True, if the player is added correctly; false if the lobby is full.
- Definition Classes
- ServerImpl → Server
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
bind(actorRef: ActorRef): Unit
Binds this instance with the input ActorRef.
Binds this instance with the input ActorRef.
- actorRef
The ActorRef.
- Definition Classes
- ServerImpl → Server
-
def
broadcastMessage(message: Any, clientsToExclude: String*): Unit
Broadcasts a message to all connected clients.
Broadcasts a message to all connected clients.
- message
The message to send.
- clientsToExclude
Specify clients to which the delivery must not be performed.
- Definition Classes
- ServerImpl → Server
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
closeLobby(): Unit
Closes the lobby, all further requests to enter it are ignored.
Closes the lobby, all further requests to enter it are ignored.
- Definition Classes
- ServerImpl → Server
-
def
createLobby(lobbyContext: LobbyContext): Unit
Creates a lobby and enters it, all further requests to enter it are handled.
Creates a lobby and enters it, all further requests to enter it are handled.
- lobbyContext
The lobby context.
- Definition Classes
- ServerImpl → Server
-
def
deliverMessage(username: String, message: Any): Unit
Delivers a message to a specified client.
Delivers a message to a specified client.
- username
The player username.
- message
The message.
- Definition Classes
- ServerImpl → Server
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getLobbyPlayers: Seq[ReferablePlayer]
Gets the lobby players.
-
def
getState: ServerState
Gets the state of the server.
-
def
getUUID: String
Gets the uuid of the cell entity that represents this client.
Gets the uuid of the cell entity that represents this client.
- returns
The uuid.
- Definition Classes
- ServerImpl → Server
-
def
getUsername: String
Gets the username of the player representing the server.
Gets the username of the player representing the server.
- returns
The username.
- Definition Classes
- ServerImpl → Server
-
def
initGame(level: Level): Promise[Boolean]
Signals all clients that the game needs to be started and checks that they all reply.
Signals all clients that the game needs to be started and checks that they all reply.
- level
The level.
- returns
Promise that completes with true if all clients replied before the timeout; otherwise false.
- Definition Classes
- ServerImpl → Server
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
kill(): Unit
Kills this instance.
Kills this instance.
- Definition Classes
- ServerImpl → Server
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
notifyClientInputEvent(event: MouseEventWrapper): Unit
Notifies server about new client input event.
-
def
removePlayerFromGame(username: String, notify: Boolean = false): Unit
Removes the player from the game.
Removes the player from the game.
- username
The player username.
- notify
If the player client needs to be notified.
- Definition Classes
- ServerImpl → Server
-
def
removePlayerFromLobby(username: String): Unit
Removes a player from the lobby.
Removes a player from the lobby.
- username
The username of the player.
- Definition Classes
- ServerImpl → Server
-
def
startGame(levelContext: MultiPlayerLevelContext, levelInfo: LevelInfo): Unit
Starts the game by notifying the interface and passing the level context to use.
Starts the game by notifying the interface and passing the level context to use.
- levelContext
The level context.
- levelInfo
The level info.
- Definition Classes
- ServerImpl → Server
-
def
stopGame(winner: String = username): Unit
Signals all clients that the game have been stopped.
Signals all clients that the game have been stopped.
- winner
The username of the player who won, if not declared the winner is assumed to be the server.
- Definition Classes
- ServerImpl → Server
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit
val
timeout: Timeout
- Definition Classes
- Server
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
implicit
val
who: String
- Definition Classes
- Server