feat(ui): added half working ingame ui

Added ingame ui with bootstrap. There are problems with the lock procedure
This commit is contained in:
LQ63
2025-11-05 02:19:26 +01:00
parent fd09802301
commit 1309a93e82
5 changed files with 51 additions and 44 deletions

View File

@@ -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()
}