コード例 #1
0
ファイル: Program.cs プロジェクト: Khthonian/DeckOfCards
        static void Main(string[] args)
        {
            // Initialise the app with a fresh deck for the player
            Deck deck = new Deck();

            while (true)
            {
                // Welcome the user to the application
                // I have called the application Carreaux, the french phrase for diamonds in realtion to cards
                Console.WriteLine("Hello, I'm Carreaux, the Automatic Card Dealer\nPress ENTER to begin\nInput 'E' then ENTER to exit");
                switch (Console.ReadLine().ToLower())
                {
                case "":
                    Console.WriteLine("Let's begin!");
                    deck.FreshDeck();
                    deck.Shuffle();
                    deck.CarreauxMenu();
                    break;

                case "e":
                    Console.WriteLine("Thanks for using Carreaux, the Automatic Card Dealer");
                    System.Environment.Exit(0);
                    break;

                default:
                    break;
                }
            }
        }