feat(ui): FRO-26 Nice Tie UI #115
@@ -7,7 +7,7 @@ import model.users.User
|
|||||||
|
|
||||||
import scala.util.Try
|
import scala.util.Try
|
||||||
|
|
||||||
case class TieInfoDTO(gameId: String, currentPlayer: Option[PlayerDTO], self: Option[PlayerDTO], tiedPlayers: Seq[PlayerDTO], highestAmount: Int, selectedCards: Map[String, CardDTO])
|
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 {
|
object TieInfoDTO {
|
||||||
|
|
||||||
@@ -24,7 +24,8 @@ object TieInfoDTO {
|
|||||||
highestAmount = lobby.logic.playerTieLogic.highestAllowedNumber(),
|
highestAmount = lobby.logic.playerTieLogic.highestAllowedNumber(),
|
||||||
selectedCards = lobby.logic.playerTieLogic.getSelectedCard.map {
|
selectedCards = lobby.logic.playerTieLogic.getSelectedCard.map {
|
||||||
case (player, card) => player.id.toString -> CardDTO(card)
|
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))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user