示例#1
0
        public void ShowCPUHand(Cards Com)
        {
            Console.SetCursorPosition(CPUCardPlace, (Console.WindowHeight / 4) * 3 + (CPUCardPlace % 4));
            Console.BackgroundColor = ConsoleColor.White;
            Console.Write("   ");
            Console.SetCursorPosition(CPUCardPlace, (Console.WindowHeight / 4) * 3 - 1 + (CPUCardPlace % 4));
            if (Com.GetSuit() == 3 || Com.GetSuit() == 4)
            {
                Console.ForegroundColor = ConsoleColor.Red;
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Black;
            }

            if (Com.GetVal() == 1)
            {
                Console.Write('A' + " " + Com.GetSuit());
            }
            else if (Com.GetVal() < 10 && Com.GetVal() > 1)
            {
                Console.Write(Com.GetVal() + " " + Com.GetSuit());
            }
            else if (Com.GetVal() == 10)
            {
                Console.Write("10" + Com.GetSuit());
            }
            else if (Com.GetVal() == 11)
            {
                Console.Write('J' + " " + Com.GetSuit());
            }
            else if (Com.GetVal() == 12)
            {
                Console.Write('Q' + " " + Com.GetSuit());
            }
            else if (Com.GetVal() == 13)
            {
                Console.Write('K' + " " + Com.GetSuit());
            }
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.Gray;
        }
示例#2
0
 public void ShowPlayerHand(Cards P1)
 {
     Console.SetCursorPosition(PlayerCardPlace, Console.WindowHeight / 4 - (PlayerCardPlace % 4));
     Console.BackgroundColor = ConsoleColor.White;
     Console.Write("   ");
     Console.SetCursorPosition(PlayerCardPlace, Console.WindowHeight / 4 + 1 - (PlayerCardPlace % 4));
     if (P1.GetSuit() == (char)3 || P1.GetSuit() == (char)4)
     {
         Console.ForegroundColor = ConsoleColor.Red;
     }
     else
     {
         Console.ForegroundColor = ConsoleColor.Black;
     }
     if (P1.GetVal() == 1)
     {
         Console.Write('A' + " " + P1.GetSuit());
     }
     else if (P1.GetVal() < 10 && P1.GetVal() > 1)
     {
         Console.Write(P1.GetVal() + " " + P1.GetSuit());
     }
     else if (P1.GetVal() == 10)
     {
         Console.Write("10" + P1.GetSuit());
     }
     else if (P1.GetVal() == 11)
     {
         Console.Write('J' + " " + P1.GetSuit());
     }
     else if (P1.GetVal() == 12)
     {
         Console.Write('Q' + " " + P1.GetSuit());
     }
     else if (P1.GetVal() == 13)
     {
         Console.Write('K' + " " + P1.GetSuit());
     }
     Console.BackgroundColor = ConsoleColor.Black;
     Console.ForegroundColor = ConsoleColor.Gray;
 }
示例#3
0
        public void TurnCards(Cards P1, Cards Com)
        {
            Console.SetCursorPosition(WarCardPlace, Console.WindowHeight / 4 - (WarCardPlace % 4));
            Console.BackgroundColor = ConsoleColor.White;
            Console.Write("   ");
            Console.SetCursorPosition(WarCardPlace, Console.WindowHeight / 4 + 1 - (WarCardPlace % 4));
            if (P1.GetSuit() == (char)3 || P1.GetSuit() == (char)4)
            {
                Console.ForegroundColor = ConsoleColor.Red;
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Black;
            }
            if (P1.GetVal() == 1)
            {
                Console.Write('A' + " " + P1.GetSuit());
            }
            else if (P1.GetVal() < 10 && P1.GetVal() > 1)
            {
                Console.Write(P1.GetVal() + " " + P1.GetSuit());
            }
            else if (P1.GetVal() == 10)
            {
                Console.Write("10" + P1.GetSuit());
            }
            else if (P1.GetVal() == 11)
            {
                Console.Write('J' + " " + P1.GetSuit());
            }
            else if (P1.GetVal() == 12)
            {
                Console.Write('Q' + " " + P1.GetSuit());
            }
            else if (P1.GetVal() == 13)
            {
                Console.Write('K' + " " + P1.GetSuit());
            }

            Console.SetCursorPosition(WarCardPlace, (Console.WindowHeight / 4) * 3 + (WarCardPlace % 4));
            Console.BackgroundColor = ConsoleColor.White;
            Console.Write("   ");
            Console.SetCursorPosition(WarCardPlace, (Console.WindowHeight / 4) * 3 - 1 + (WarCardPlace % 4));
            if (Com.GetSuit() == 3 || Com.GetSuit() == 4)
            {
                Console.ForegroundColor = ConsoleColor.Red;
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Black;
            }

            if (Com.GetVal() == 1)
            {
                Console.Write('A' + " " + Com.GetSuit());
            }
            else if (Com.GetVal() < 10 && Com.GetVal() > 1)
            {
                Console.Write(Com.GetVal() + " " + Com.GetSuit());
            }
            else if (Com.GetVal() == 10)
            {
                Console.Write("10" + Com.GetSuit());
            }
            else if (Com.GetVal() == 11)
            {
                Console.Write('J' + " " + Com.GetSuit());
            }
            else if (Com.GetVal() == 12)
            {
                Console.Write('Q' + " " + Com.GetSuit());
            }
            else if (Com.GetVal() == 13)
            {
                Console.Write('K' + " " + Com.GetSuit());
            }

            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.Gray;
        }