public void RemoveCard(TCGClient.Data.Models.CardType type, int id) { if (_gameCards[id].CardType == type) { _gameCards.RemoveAt(id); } }
public void ModifyCard(TCGClient.Data.Models.CardType searchType, int id, TCGClient.Data.Models.CardType newType) { for (int i = 0; i < _gameCards.Count; i++) { if (_gameCards[i].CardType == searchType && _gameCards[i].ID == id) { _gameCards[i].CardType = newType; return; } } }
public void RemoveAllCards(TCGClient.Data.Models.CardType type) { for (int i = 0; i < _gameCards.Count; i++) { if (_gameCards[i].CardType == type) { _gameCards.RemoveAt(i); i--; } } }
public void AddCard(TCGClient.Data.Models.CardType type, int x, int y, int id) { _gameCards.Add(new Card() { CardType = type, Left = x, Top = y, Width = (int)Data.Models.Card.CardWidth, Height = (int)Data.Models.Card.CardHeight, ID = id }); }