Packages

final case class ServerImpl(username: String) extends Server with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Server, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ServerImpl
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Server
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ServerImpl(username: String)

Type Members

  1. type ServerState = ServerState.Value
    Definition Classes
    Server

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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
    ServerImplServer
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def bind(actorRef: ActorRef): Unit

    Binds this instance with the input ActorRef.

    Binds this instance with the input ActorRef.

    actorRef

    The ActorRef.

    Definition Classes
    ServerImplServer
  7. 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
    ServerImplServer
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. 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
    ServerImplServer
  10. 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
    ServerImplServer
  11. 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
    ServerImplServer
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def getLobbyPlayers: Seq[ReferablePlayer]

    Gets the lobby players.

    Gets the lobby players.

    returns

    All players in the lobby.

    Definition Classes
    ServerImplServer
  16. def getState: ServerState

    Gets the state of the server.

    Gets the state of the server.

    returns

    The server state.

    Definition Classes
    ServerImplServer
  17. 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
    ServerImplServer
  18. 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
    ServerImplServer
  19. 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
    ServerImplServer
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def kill(): Unit

    Kills this instance.

    Kills this instance.

    Definition Classes
    ServerImplServer
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def notifyClientInputEvent(event: MouseEventWrapper): Unit

    Notifies server about new client input event.

    Notifies server about new client input event.

    event

    The event.

    Definition Classes
    ServerImplServer
  26. 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
    ServerImplServer
  27. 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
    ServerImplServer
  28. 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
    ServerImplServer
  29. 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
    ServerImplServer
  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. implicit val timeout: Timeout
    Definition Classes
    Server
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  35. implicit val who: String
    Definition Classes
    Server

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Server

Inherited from AnyRef

Inherited from Any

Ungrouped