示例#1
0
        public static void Handler(string input)
        {
            switch (input)
            {
            case "1":
                singleGame();     //displaySingleGame
                break;

            case "2":
                doubleGame();
                break;

            case "q":
            case "Q":
                Environment.Exit(0);
                break;

            case "i":
            case "I":
                displayInfo();
                break;

            default:
                Loops.MenuLoop();     //Refresh menu, move loop to menu
                break;
            }
        }
示例#2
0
        public static void Main()
        {
            do
            {
                switch (Globals.gameState)
                {
                case "menu":
                    Loops.MenuLoop();
                    break;

                case "single":
                    Loops.SingleGameLoop();
                    break;

                case "double":
                    Loops.DoubleGameLoop();
                    break;

                default:
                    Globals.gameState = "menu";
                    break;
                }
            } while (true);
        }