示例#1
0
        private void display_hands()
        {
            string[] round_end_lines = { "As silence fills the air",
                                         "As the last chips clatter to a halt",
                                         "Everyone stares at another player as they put down their hands",
                                         "The dealer coughs lightly",
                                         "Hazy figures approach the table to see the results of the round",
                                         "The dealer, with one short word, commands everyone to show their hand" };

            Console.WriteLine();
            Console.WriteLine("{0}, and everyone holds their breath as the results are declared...",
                              round_end_lines[rand.Next(round_end_lines.Length)]);
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < i; j++)
                {
                    Console.Write("\t");
                }
                Console.WriteLine("...");
            }

            Console.WriteLine();
            reset_queue();
            foreach (Player player in player_queue)
            {
                Console.WriteLine("{0} had a {1}...", player.name, Hand.get_winning_hand_string(player.hand)); // potentially organize so the highest hands are shown last
            }
            Console.WriteLine();
        }
示例#2
0
        protected void take_winnings(int winnings)
        {
            Console.Write("{0} won ${1} with a ", name, winnings);
            Console.Write(Hand.get_winning_hand_string(hand));
            Console.WriteLine("!");

            // appropriately set money
            money.win(winnings);
            money.refresh();
        }