feat(base): Fixed logic for websockets and added GameStateEvent. Might've caused instability on other feature branches!
This commit is contained in:
@@ -66,13 +66,6 @@ class MainMenuController @Inject()(
|
|||||||
game match {
|
game match {
|
||||||
case Some(g) =>
|
case Some(g) =>
|
||||||
g.addUser(request.user)
|
g.addUser(request.user)
|
||||||
if (g.getPlayers.size >= 2) {
|
|
||||||
for (player <- g.getPlayers) {
|
|
||||||
if (player._2.host) {
|
|
||||||
g.startGame(player._2.user)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Ok(Json.obj(
|
Ok(Json.obj(
|
||||||
"status" -> "success",
|
"status" -> "success",
|
||||||
"redirectUrl" -> routes.IngameController.game(g.id).url,
|
"redirectUrl" -> routes.IngameController.game(g.id).url,
|
||||||
|
|||||||
Reference in New Issue
Block a user