Autum cup 2 decider
This commit is contained in:
@@ -30,6 +30,13 @@ class LobbiesActor extends Actor with LazyLogging {
|
||||
case Some(lobbyActor) => lobbyActor ! JoinLobbyAsPlayer(LobbyUser(userName, user))
|
||||
case None => logger.error(s"Can't watch lobby $lobbyName - lobby not exists")
|
||||
}
|
||||
case ObserveLobbyByActorName(lobbyName) =>
|
||||
// get or create the StockActor for the symbol and forward this message
|
||||
val user = sender
|
||||
context.child(lobbyName) match {
|
||||
case Some(lobbyActor) => lobbyActor.tell(WatchLobby("watchIt"), user)
|
||||
case None => logger.error(s"Can't watch lobby $lobbyName - lobby not exists")
|
||||
}
|
||||
case watchLobby@WatchLobby(lobbyName) =>
|
||||
// get or create the StockActor for the symbol and forward this message
|
||||
context.child(lobbyName) match {
|
||||
@@ -50,4 +57,6 @@ case object GetAllLobbies
|
||||
|
||||
case class JoinLobbyByActorName(actorName: String, userName: String)
|
||||
|
||||
case class ObserveLobbyByActorName(actorName: String)
|
||||
|
||||
case object UnWatchAllLobbies
|
||||
Reference in New Issue
Block a user