feat(ui): implement tie & trump menu, fixed some critical bugs (#52)

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #52
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
This commit is contained in:
2025-11-13 08:20:30 +01:00
committed by Janis
parent c220e54bb8
commit 5d245d0011
11 changed files with 398 additions and 118 deletions

View File

@@ -39,12 +39,14 @@ class IngameController @Inject()(
case SelectTrump =>
Ok(views.html.ingame.selecttrump(
g.getPlayerByUser(request.user),
g.logic
g.logic,
gameId
))
case TieBreak =>
Ok(views.html.ingame.tie(
g.getPlayerByUser(request.user),
g.logic
g.logic,
gameId
))
case _ =>
InternalServerError(s"Invalid game state for in-game view. GameId: $gameId" + s" State: ${g.logic.getCurrentState}")
@@ -318,7 +320,7 @@ class IngameController @Inject()(
val session = g.getUserSession(request.user.id)
optSession = Some(session)
session.lock.lock()
g.selectTie(g.getUserSession(request.user.id), tie.toInt)
g.selectTie(g.getUserSession(request.user.id), tie.toInt - 1)
}
optSession.foreach(_.lock.unlock())
if (result.isSuccess) {