feat(ui): added half working ingame ui
Added ingame ui with bootstrap. There are problems with the lock procedure
This commit is contained in:
@@ -32,7 +32,7 @@ class IngameController @Inject()(
|
||||
case InGame =>
|
||||
Ok(views.html.ingame.ingame(
|
||||
g.getPlayerByUser(request.user),
|
||||
g.logic
|
||||
g
|
||||
))
|
||||
case SelectTrump =>
|
||||
Ok(views.html.ingame.selecttrump(
|
||||
@@ -83,7 +83,7 @@ class IngameController @Inject()(
|
||||
game.get.leaveGame(playerToKick)
|
||||
Redirect(routes.IngameController.game(gameId))
|
||||
}
|
||||
def leaveGame(gameId: String): Action[AnyContent] = authAction { implicit request: AuthenticatedRequest[AnyContent] =>
|
||||
def leaveGame(gameId: String): Action[AnyContent] = authAction { implicit request: AuthenticatedRequest[AnyContent] =>
|
||||
val game = podManager.getGame(gameId)
|
||||
game.get.leaveGame(request.user.id)
|
||||
Redirect(routes.MainMenuController.mainMenu())
|
||||
@@ -121,9 +121,10 @@ class IngameController @Inject()(
|
||||
val cardIdOpt = request.body.asFormUrlEncoded.flatMap(_.get("cardId").flatMap(_.headOption))
|
||||
cardIdOpt match {
|
||||
case Some(cardId) =>
|
||||
val result = Try {
|
||||
val session = g.getUserSession(request.user.id)
|
||||
val session = g.getUserSession(request.user.id)
|
||||
session.lock.lock()
|
||||
val result = Try {
|
||||
|
||||
g.playCard(session, cardId.toInt)
|
||||
session.lock.unlock()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user