public List<HJD.Pexeso.Engine.DTO.Card> GetCards() { List<HJD.Pexeso.Engine.DTO.Card> cards = new List<HJD.Pexeso.Engine.DTO.Card>(); foreach (ICard card in game.Cards.Values) { HJD.Pexeso.Engine.DTO.Card cardDTO = new HJD.Pexeso.Engine.DTO.Card() { Id = card.Id, IsTurnedFaceUp = card.IsTurnedFaceUp, GroupId = card.GroupId, Removed = card.Removed }; cards.Add(cardDTO); } return cards; }
private HJD.Pexeso.Engine.DTO.Card TransferICardToDTO(ICard card) { HJD.Pexeso.Engine.DTO.Card cardDTO = new HJD.Pexeso.Engine.DTO.Card() { Id = card.Id, IsTurnedFaceUp = card.IsTurnedFaceUp, GroupId = card.GroupId, Removed = card.Removed }; return cardDTO; }