Admin controller draft

This commit is contained in:
Viktor Kholodov
2021-01-09 02:09:00 +03:00
parent 23f566af51
commit e702bd61b4
13 changed files with 119 additions and 37 deletions
+7 -2
View File
@@ -172,9 +172,14 @@ class LobbieActor(hostUser: LobbyUser) extends Actor with LazyLogging {
users.foreach(_ ! HostLeaveLobby)
context.stop(self)
}else if(secondPlayer.exists(_.actorRef == sender())){
users.foreach(_ ! SecondPlayerLeaveLobby)
secondPlayerReady = false
secondPlayer = None
context.stop(self)
if(status == Draft()){
users.foreach(_ ! SecondPlayerLeaveLobby)
context.stop(self)
}else {
users.foreach(_ ! RefreshLobbyInfo(getLobbyInfoResponse))
}
}
if (users.isEmpty) {
logger.info(s"Stop lobby ${self.path.name}")