feat(ui): FRO-26 Nice Tie UI #115
@@ -1,12 +1,13 @@
|
|||||||
package dto
|
package dto
|
||||||
|
|
||||||
import dto.subDTO.PlayerDTO
|
import de.knockoutwhist.cards.Card
|
||||||
|
import dto.subDTO.{CardDTO, PlayerDTO}
|
||||||
import logic.game.GameLobby
|
import logic.game.GameLobby
|
||||||
import model.users.User
|
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)
|
case class TieInfoDTO(gameId: String, currentPlayer: Option[PlayerDTO], self: Option[PlayerDTO], tiedPlayers: Seq[PlayerDTO], highestAmount: Int, selectedCards: Map[String, CardDTO])
|
||||||
|
|
||||||
object TieInfoDTO {
|
object TieInfoDTO {
|
||||||
|
|
||||||
@@ -20,7 +21,10 @@ object TieInfoDTO {
|
|||||||
currentPlayer = lobby.logic.playerTieLogic.currentTiePlayer().map(PlayerDTO.apply),
|
currentPlayer = lobby.logic.playerTieLogic.currentTiePlayer().map(PlayerDTO.apply),
|
||||||
self = selfPlayer.map(PlayerDTO.apply),
|
self = selfPlayer.map(PlayerDTO.apply),
|
||||||
tiedPlayers = lobby.logic.playerTieLogic.getTiedPlayers.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)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user