30 lines
656 B
C#
30 lines
656 B
C#
namespace MauMau_Server.Mau.GameMessages;
|
|
|
|
public class PlayCard
|
|
{
|
|
public string CardType { get; set; }
|
|
public string CardValue { get; set; }
|
|
|
|
public PlayCard(Card card)
|
|
{
|
|
CardType = card.CardType.ToString();
|
|
CardValue = card.CardValue.ToString();
|
|
}
|
|
|
|
public PlayCard(string cardType, string cardValue)
|
|
{
|
|
CardType = cardType;
|
|
CardValue = cardValue;
|
|
}
|
|
|
|
public PlayCard()
|
|
{
|
|
|
|
}
|
|
|
|
public Card ToCard()
|
|
{
|
|
return new Card((CardType)Enum.Parse(typeof(CardType), CardType),
|
|
(CardValue)Enum.Parse(typeof(CardValue), CardValue));
|
|
}
|
|
} |