public static string GetCardFaction(AbstractCard input_Card) { if (IsValidCardID(input_Card)) { return(input_Card.GetID().Split(':')[0]); } else { Console.WriteLine("ERROR >> Invalid Card ID with \"" + input_Card.GetID()); } return(""); }
public static bool DeckHasCard(AbstractCard card, AbstractDeck deck) { if (card == null) { throw new exceptions.NullCardException(); } AbstractCard[] CardList = deck.GetArrayOfCardsInDeck(); for (int i = 0; i < CardList.Length; i++) { if (CardList[i].GetID() == card.GetID()) { return(true); } } return(false); }
public static bool IsValidCardID(AbstractCard input_Card) { return(input_Card.GetID() != null && input_Card.GetID() != "" && input_Card.GetID().Contains(":")); }