Compare commits

..

2 Commits

Author SHA1 Message Date
TeamCity
ad5add0ffc ci: bump version to v4.54.0 2026-01-22 00:15:50 +00:00
30c05c3014 feat(ui): FRO-26 Nice Tie UI (#115)
Added nice tie UI Component

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #115
2026-01-22 01:11:17 +01:00
3 changed files with 14 additions and 5 deletions

View File

@@ -459,3 +459,7 @@
* Update CORS allowed origins to use production URL ([66b5594](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/66b55945eb8f095c08a8f859955d31f7fc32ce0e))
## (2026-01-22)
### Features
* **ui:** FRO-26 Nice Tie UI ([#115](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/issues/115)) ([30c05c3](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Web/commit/30c05c3014e9198e87706518bfa8d070f33242dc))

View File

@@ -1,12 +1,13 @@
package dto
import dto.subDTO.PlayerDTO
import de.knockoutwhist.cards.Card
import dto.subDTO.{CardDTO, PlayerDTO}
import logic.game.GameLobby
import model.users.User
import scala.util.Try
case class TieInfoDTO(gameId: String, currentPlayer: Option[PlayerDTO], self: Option[PlayerDTO], tiedPlayers: Seq[PlayerDTO], highestAmount: Int)
case class TieInfoDTO(gameId: String, currentPlayer: Option[PlayerDTO], self: Option[PlayerDTO], tiedPlayers: Seq[PlayerDTO], highestAmount: Int, selectedCards: Map[String, CardDTO], winners: Option[Seq[PlayerDTO]])
object TieInfoDTO {
@@ -20,7 +21,11 @@ object TieInfoDTO {
currentPlayer = lobby.logic.playerTieLogic.currentTiePlayer().map(PlayerDTO.apply),
self = selfPlayer.map(PlayerDTO.apply),
tiedPlayers = lobby.logic.playerTieLogic.getTiedPlayers.map(PlayerDTO.apply),
highestAmount = lobby.logic.playerTieLogic.highestAllowedNumber()
highestAmount = lobby.logic.playerTieLogic.highestAllowedNumber(),
selectedCards = lobby.logic.playerTieLogic.getSelectedCard.map {
case (player, card) => player.id.toString -> CardDTO(card)
},
winners = Some(lobby.logic.playerTieLogic.getSelectedCard.filter((_,card) => card == lobby.logic.playerTieLogic.getSelectedCard.values.maxBy(_.cardValue.ordinal)).keySet.toList.map(PlayerDTO.apply))
)
}

View File

@@ -1,3 +1,3 @@
MAJOR=4
MINOR=53
PATCH=1
MINOR=54
PATCH=0