Example #1
0
        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;
        }
Example #2
0
        public static string CardImage(CardsANDdeck card)
        {
            string value = card.GetSuitAndValue() + " ";

            if (card.Value != 10)
            {
                value += " ";
            }

            return($@"
         _____     
        |{value} |
        |     |
        |     |
        |     |
        |___{value}
            ");
        }
Example #3
0
        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}|
");
        }
Example #4
0
 public static void ShowCards(CardsANDdeck cardA, CardsANDdeck cardB) => Print(TwoCardImages(cardA, cardB));
Example #5
0
 //remove
 public void Remove(CardsANDdeck card)
 {
     cards.Remove(card);
 }
Example #6
0
 //show
 public string Show(CardsANDdeck card)
 {
     return(card.Name);
 }