Exemple #1
0
        public static void TitleScreen()
        {
            int width = 28;

            PrintUtils.GetHash(width);
            PrintUtils.CenterPadHash("Welcome to Bordertale!", width);
            PrintUtils.CenterPadHash("- Play -", width);
            PrintUtils.CenterPadHash("- Resume -", width);
            PrintUtils.CenterPadHash("- Help -", width);
            PrintUtils.CenterPadHash("- Acknoledgements -", width);
            PrintUtils.CenterPadHash("- Quit -", width);
            PrintUtils.CenterPadHash("Copyright 2021 tejmen09", width);
            PrintUtils.GetHash(width);
            bool inLoop = true;

            while (inLoop)
            {
                string option = PrintUtils.Input().ToLower();
                switch (option)
                {
                case "play":
                    inLoop = false;
                    MainGame.StartGame();
                    break;

                case "help":
                    inLoop = false;
                    HelpScreen(false);
                    break;

                case "quit":
                    inLoop = false;
                    PrintUtils.GetHash(15);
                    PrintUtils.CenterPadHash("GOODBYE!!", 15);
                    PrintUtils.GetHash(15);
                    Thread.Sleep(500);
                    Environment.Exit(0);
                    break;

                case "acknowledgements":
                    inLoop = false;
                    AcknowledgementsScreen();
                    break;

                case "resume":
                    inLoop = false;
                    MainGame.MainGameLoop();
                    break;

                default:
                    Console.WriteLine("Please enter a valid command.");
                    break;
                }
            }
        }
Exemple #2
0
        public static void TitleScreen()
        {
            int width = 28;

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(" _______  _______  ______    ______   _______  ______    _______  _______  ___      _______ ");
            Console.ForegroundColor = ConsoleColor.DarkYellow;
            Console.WriteLine("|  _    ||       ||    _ |  |      | |       ||    _ |  |       ||   _   ||   |    |       |");
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("| |_|   ||   _   ||   | ||  |  _    ||    ___||   | ||  |_     _||  |_|  ||   |    |    ___|");
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Console.WriteLine("|       ||  | |  ||   |_||_ | | |   ||   |___ |   |_||_   |   |  |       ||   |    |   |___ ");
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("|  _   | |  |_|  ||    __  || |_|   ||    ___||    __  |  |   |  |       ||   |___ |    ___|");
            Console.ForegroundColor = ConsoleColor.DarkBlue;
            Console.WriteLine("| |_|   ||       ||   |  | ||       ||   |___ |   |  | |  |   |  |   _   ||       ||   |___ ");
            Console.ForegroundColor = ConsoleColor.Magenta;
            Console.WriteLine("|_______||_______||___|  |_||______| |_______||___|  |_|  |___|  |__| |__||_______||_______|\n");
            Console.ResetColor();
            PrintUtils.GetHash(width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("Welcome to Bordertale!", width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("- Play -", width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("- Resume -", width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("- Help -", width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("- Acknowledgements -", width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("- Quit -", width, ConsoleColor.Yellow);
            PrintUtils.CenterPadHash("Copyright 2021 tejmen09", width, ConsoleColor.Yellow);
            PrintUtils.GetHash(width, ConsoleColor.Yellow);

            bool inLoop = true;

            while (inLoop)
            {
                string option = PrintUtils.Input().ToLower();
                switch (option)
                {
                case "play":
                    inLoop = false;
                    MainGame.StartGame();
                    break;

                case "help":
                    inLoop = false;
                    HelpScreen(false);
                    break;

                case "quit":
                    inLoop = false;
                    PrintUtils.GetHash(15, ConsoleColor.DarkYellow);
                    PrintUtils.CenterPadHash("GOODBYE!!", 15, ConsoleColor.DarkYellow);
                    PrintUtils.GetHash(15, ConsoleColor.DarkYellow);
                    Thread.Sleep(500);
                    Environment.Exit(0);
                    break;

                case "acknowledgements":
                    inLoop = false;
                    AcknowledgementsScreen();
                    break;

                case "resume":
                    inLoop = false;
                    // TODO Add ResumeGame() Functionality, ideally from a json object stored through a file.
                    break;

                default:
                    Console.WriteLine("Please enter a valid command.");
                    break;
                }
            }
        }