Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad5add0ffc | ||
| 30c05c3014 |
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
MAJOR=4
|
||||
MINOR=53
|
||||
PATCH=1
|
||||
MINOR=54
|
||||
PATCH=0
|
||||
|
||||
Reference in New Issue
Block a user