Packages

trait Server extends AnyRef

Trait representing a Server

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Server
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type ServerState = ServerState.Value

Abstract Value Members

  1. abstract 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.

  2. abstract def bind(actorRef: ActorRef): Unit

    Binds this instance with the input ActorRef.

    Binds this instance with the input ActorRef.

    actorRef

    The ActorRef.

  3. abstract 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.

  4. abstract def closeLobby(): Unit

    Closes the lobby, all further requests to enter it are ignored.

  5. abstract 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.

  6. abstract 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.

  7. abstract def getLobbyPlayers: Seq[ReferablePlayer]

    Gets the lobby players.

    Gets the lobby players.

    returns

    All players in the lobby.

  8. abstract def getState: ServerState

    Gets the state of the server.

    Gets the state of the server.

    returns

    The server state.

  9. abstract 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.

  10. abstract def getUsername: String

    Gets the username of the player representing the server.

    Gets the username of the player representing the server.

    returns

    The username.

  11. abstract 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.

  12. abstract def kill(): Unit

    Kills this instance.

  13. abstract def notifyClientInputEvent(event: MouseEventWrapper): Unit

    Notifies server about new client input event.

    Notifies server about new client input event.

    event

    The event.

  14. abstract 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.

  15. abstract def removePlayerFromLobby(username: String): Unit

    Removes a player from the lobby.

    Removes a player from the lobby.

    username

    The username of the player.

  16. abstract 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.

  17. abstract def stopGame(winner: String = ""): 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.

Concrete 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. implicit val timeout: Timeout
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  21. implicit val who: String

Inherited from AnyRef

Inherited from Any

Ungrouped