示例#1
0
        public void DisplayCards()
        {
            Console.Clear();
            int x = 0; // x position of the cursor. we move it left and right
            int y = 1; //y position of the cursor, we move up and down

            //display player hand
            Console.ForegroundColor = ConsoleColor.DarkCyan;
            Console.WriteLine("PLAYER'S HAND");
            for (int i = 0; i < 5; i++)
            {
                DrawCards.DrawCardOutline(x, y);
                DrawCards.DrawCardSuitValue(sortedPlayerHand[i], x, y);
                i++;
            }
            y = 15; //move the row of computer cards below the player's cards
            x = 0;  // reset x position

            Console.SetCursorPosition(x, 14);
            Console.ForegroundColor = ConsoleColor.DarkRed;
            Console.WriteLine("COMPUTER'S HAND");
            for (int i = 5; i < 10; i++)
            {
                DrawCards.DrawCardOutline(x, y);
                DrawCards.DrawCardSuitValue(sortedComputerHand[i - 5], x, y);
                x++;
            }
        }
示例#2
0
        } // END OF SortCards method

        public void DisplayCards()
        {
            Console.Clear();
            int x = 0;
            int y = 1;

            Console.ForegroundColor = ConsoleColor.DarkCyan;
            Console.WriteLine("Player's Hand");
            for (int i = 0; i < 5; i++)
            {
                DrawCards.DrawCardSuitRank(sortedPlayerHand[i], x, y);
                x++;
            }
            y = 10;
            x = 0;
            Console.SetCursorPosition(x, 8);
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Console.WriteLine("CPU's Hand");
            for (int i = 5; i < 10; i++)
            {
                DrawCards.DrawCardSuitRank(sortedCpuHand[i - 5], x, y);
                x++;
            }
        }