public static void ShowCard(CardsANDdeck card) { ConsoleColor color = ForegroundColor; if (card.Suits == Suit.Diamonds || card.Suits == Suit.Hearts) { ForegroundColor = ConsoleColor.DarkRed; } else { ForegroundColor = ConsoleColor.Black; } Print(CardImage(card)); ForegroundColor = color; }
public static string CardImage(CardsANDdeck card) { string value = card.GetSuitAndValue() + " "; if (card.Value != 10) { value += " "; } return($@" _____ |{value} | | | | | | | |___{value} "); }
public static string TwoCardImages(CardsANDdeck cardA, CardsANDdeck cardB) {//TODO: Change color depending on suit string valueA = cardA.Value != 10 ? cardA.GetSuitAndValue() + " " : cardA.GetSuitAndValue(); string valueB = cardB.Value != 10 ? cardB.GetSuitAndValue() + " " : cardB.GetSuitAndValue(); return($@" 1 2 _____ _____ |{valueA} | |{valueB} | | | | | | | | | | | | | |__{valueA}| |__{valueB}| "); }
public static void ShowCards(CardsANDdeck cardA, CardsANDdeck cardB) => Print(TwoCardImages(cardA, cardB));
//remove public void Remove(CardsANDdeck card) { cards.Remove(card); }
//show public string Show(CardsANDdeck card) { return(card.Name); }