feat(ui): Tie selection (#111)

Added ability to pick a tie card in the backend

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #111
This commit is contained in:
2026-01-13 14:33:25 +01:00
parent 4a4e9c48fc
commit dc3da9a75c
2 changed files with 11 additions and 1 deletions

View File

@@ -73,6 +73,15 @@ class UserSession(val user: User, val host: Boolean, val gameLobby: GameLobby) e
case None =>
println("Card Index not found or is not a number.")
}
case "PickTie" =>
val maybeCardIndex: Option[Int] = (data \ "cardIndex").asOpt[Int]
maybeCardIndex match {
case Some(index) =>
val session = gameLobby.getUserSession(user.id)
gameLobby.selectTie(session, index)
case None =>
println("Card Index not found or is not a number.")
}
case "KickPlayer" =>
val maybePlayerId: Option[String] = (data \ "playerId").asOpt[String]
maybePlayerId match {