Files
KnockOutWhist-Web/knockoutwhistweb/app/dto/subDTO/RoundDTO.scala
Janis fa3d21e303 fix: FRO-29 Websocket Communication (#104)
Reviewed-on: #104
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
2025-12-10 09:42:50 +01:00

19 lines
455 B
Scala

package dto.subDTO
import de.knockoutwhist.cards.Card
import de.knockoutwhist.cards.CardValue.Ace
case class RoundDTO(trumpSuit: CardDTO, firstRound: Boolean, trickList: List[TrickDTO])
object RoundDTO {
def apply(round: de.knockoutwhist.rounds.Round): RoundDTO = {
RoundDTO(
trumpSuit = CardDTO(Card(Ace, round.trumpSuit)),
firstRound = round.firstRound,
trickList = round.tricklist.map(trick => TrickDTO(trick))
)
}
}