Big boss of summer tournament

This commit is contained in:
Viktor Kholodov 2021-09-04 04:33:27 +03:00
parent 208dd5936d
commit a4a74f5c6f
5 changed files with 18 additions and 19 deletions

View File

@ -31,14 +31,12 @@ class LobbiesActor extends Actor with LazyLogging {
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 {
case Some(lobbyActor) => lobbyActor forward watchLobby
case None => logger.error(s"Can't watch lobby $lobbyName - lobby not exists")

View File

@ -125,16 +125,6 @@ class UserActor(out: ActorRef,
case Some("userName") =>
name = (json \ "name").as[String]
logger.debug(s"Set user name: $name for actor ${this.self}")
case Some("getAllUsers") =>
val userActorsFuture = (userParentActor ? UserParentActor.GetAllUsers).mapTo[Iterable[ActorRef]]
userActorsFuture.map(actorRefs => {
logger.debug(s"There are ${actorRefs.size} users on site")
actorRefs.map(userActorRef => userActorRef ? GetName).map(res => {
res.onComplete {
case Success(name) => logger.debug(s"There is $name on site")
}
})
})
case Some("createDecider") =>
LobbiesActor.actor ! CreateLobby(name)
@ -177,11 +167,16 @@ class UserActor(out: ActorRef,
logger.debug("Get all lobby request")
(LobbiesActor.actor ? GetAllLobbies).mapTo[List[RefreshLobbyInfo]] onComplete {
case Success(lobbies) => {
logger.info(s"Received lobbies: $lobbies")
logger.debug(s"Received lobbies: $lobbies")
out ! Json.obj("type" -> "lobbies", "lobbies" -> lobbies.map(res => res.lobbyInfo))
}
case Failure(ex) => logger.error("Received error", ex)
}
case Some(value) =>
logger.error(s"Command '$value' not expected")
case None =>
logger.error(s"Field 'type' should be specified in incoming json'")
}
}

View File

@ -51,9 +51,14 @@
</div>
</div>
<div style="clear: both"></div>
<div><i><b>Правила турнира Мясорубка</b><br/>
<p>Выбор карт в БО3 и БО5 осуществляется без лузерпиков, с тремя и пятью десайдерами соответственно. Игроки вычеркивают по очереди карты из маппула, пока их не останется 3 (для БО3) или 5 (для БО5). На этих картах и проходят все матчи встречи. Затем игроки вычеркивают выбранные карты, пока не останется только одна, на которой и играется первый матч встречи. Тот, кто первым начал вычеркивать из всего маппула, уступает оппоненту право вычеркивания первой карты из оставшихся карт-десайдеров. Во втором и последующем матчах проигравший выбирает карту из числа выбранных 3 (5) десайдеров.</p>
<p>You and your opponent disclude maps one-by-one, untill you'll get 3 (or five, for finals). By doing so, you decline 10 maps and won't play on them in the round. After that, you and your opponent disclude one map, to play your first match on the last map. Two left maps you and your opponent use as looser picks in the second and the third matches.</p>
<div><i><b>Правила турнира Big Boss of Summer 2021</b><br/>
<p>Выбор карт в БО3 и БО5 осуществляется без лузерпиков, с тремя и пятью десайдерами соответственно.
Игроки вычеркивают по очереди карты из маппула, пока их не останется 3 (для БО3) или 5 (для БО5).
На этих картах и проходят все матчи встречи. Затем игроки вычеркивают выбранные карты, пока не останется только одна, на которой и играется первый матч встречи.
Тот, кто первым начал вычеркивать из всего маппула, уступает оппоненту право вычеркивания первой карты из оставшихся карт-десайдеров.
Во втором и последующем матчах проигравший выбирает карту из числа выбранных 3 (5) десайдеров.</p>
<p>В суперфинале турнира оба игрока вычеркивают по две карты. После этого из оставшихся 9 карт можно брать любые, выбирает их проигравший в предыдущем матче.
Первый лузер-пик - за игроком из нижней сетки, который начинает с -1 очком.</p>
</i>
</div>

View File

@ -16,8 +16,8 @@ maps = ["2p_battle_marshes",
"2p_shrine_of_excellion_[Rem]",
"2p_titan_fall_[Rem]",
"2p_tranquilitys_end_[Rem]",
"2p_fraziersdemise.jpg",
"2p_vortex_plateau",
"2p_sugaroasis",
"2p_fraziersdemise",
"2p_emerald_river",
"2p_deadly_fun_archeology",
"2p_blood_river_[Rem]"]

View File

@ -3,6 +3,7 @@
# ~~~~
GET /meatgrinder controllers.HomeController.index
GET /bigbossofsummer controllers.HomeController.index
GET /dvijcup controllers.HomeController.index
GET /ws controllers.HomeController.ws