1st json over websocket test

This commit is contained in:
2023-03-16 15:20:28 +01:00
parent 405a14ad28
commit 4f85f6f793
7 changed files with 181 additions and 5 deletions

30
Mau/CardDTO.cs Normal file
View File

@@ -0,0 +1,30 @@
namespace MauMau_Server.Mau;
public class CardDTO
{
public string CardType { get; set; }
public string CardValue { get; set; }
public CardDTO(Card card)
{
CardType = card.CardType.ToString();
CardValue = card.CardValue.ToString();
}
public CardDTO(string cardType, string cardValue)
{
CardType = cardType;
CardValue = cardValue;
}
public CardDTO()
{
}
public Card ToCard()
{
return new Card((CardType)Enum.Parse(typeof(CardType), CardType),
(CardValue)Enum.Parse(typeof(CardValue), CardValue));
}
}