public void AddCard(Card c)
 {
     hand.Add(c);
 }
        static void Main(string[] args)
        {
            Console.WriteLine("How many players (2-8)? ");
            int playerCount = Int32.Parse(Console.ReadLine());

            Deck deck = new Deck();

            Player player = new Player();
            player.AddCard(deck.draw());
            player.AddCard(deck.draw());

            Console.Write("Your hand: ");
            player.PrintHand();

            List<Player> CPUs = new List<Player>();

            for (int i = 1; i < playerCount; i++)
            {
                CPUs.Add(new Player());
                CPUs[i - 1].AddCard(deck.draw());
                CPUs[i - 1].AddCard(deck.draw());
                Console.Write("CPU " + i + " Hand: ");
                CPUs[i - 1].PrintHand();
            }

            Console.WriteLine();

            flop = new List<Card>();

            Console.Write("Flop: ");
            flop.Add(deck.draw());
            flop[0].Print();
            Console.Write(", ");
            flop.Add(deck.draw());
            flop[1].Print();
            Console.Write(", ");
            flop.Add(deck.draw());
            flop[2].Print();
            Console.Write("\n");

            List<Player> remainingPlayers = new List<Player>();
            List<Player> foldedPlayers = new List<Player>();
            remainingPlayers.Add(player);
            for (int i = 1; i < playerCount; i++)
            {
                //Determine who folds
                if(CPUs[i-1].IsFolding())
                {
                    Console.WriteLine("CPU " + i + " Folds!");
                    foldedPlayers.Add(CPUs[i - 1]);
                }
                else
                {
                    remainingPlayers.Add(CPUs[i - 1]);
                }
            }

            Console.Write("Turn: ");
            Turn = deck.draw();
            Turn.Print();
            Console.Write("\n");

            Console.Write("River: ");
            River = deck.draw();
            River.Print();
            Console.Write("\n");

            //Determine final hands and print who won
            int winner = 0;
            player.DetermineFinalHandValueAndType();
            long winningHandValue = player.handValue;
            for (int i = 1; i < remainingPlayers.Count; i++)
            {
                remainingPlayers[i].DetermineFinalHandValueAndType();
                if(remainingPlayers[i].handValue > winningHandValue)
                {
                    winningHandValue = remainingPlayers[i].handValue;
                    for(int j = 0; j < playerCount-1; j++)
                    {
                        if (CPUs[j].handValue == winningHandValue)
                            winner = i;
                    }
                }
            }
            Console.WriteLine();
            if (winner == 0)
                Console.WriteLine("Winner: Player. " + player.handType);
            else
                Console.WriteLine("Winner: CPU " + winner + ". " + remainingPlayers[winner].handType);

            //Determine who had the best hand and print
            for (int i = 1; i < foldedPlayers.Count; i++)
            {
                foldedPlayers[i].DetermineFinalHandValueAndType();
                if (foldedPlayers[i].handValue > winningHandValue)
                {
                    winningHandValue = foldedPlayers[i].handValue;
                    for (int j = 0; j < playerCount - 1; j++)
                    {
                        if (CPUs[j].handValue == winningHandValue)
                            winner = i;
                    }
                }
            }

            if (winner == 0)
                Console.WriteLine("Best Hand: Player");
            else
                Console.WriteLine("Best Hand: CPU " + winner + ".");

            Console.ReadLine();
        }
 public static int SortByCardNumer(Card a, Card b)
 {
     if ((int)a.cardNumber > (int)b.cardNumber)
         return 1;
     else
         return -1;
 }