Beispiel #1
0
        private static void DisplaySeaMonster(SeaMonster seaMonster)
        {
            Console.ForegroundColor = ConsoleColor.DarkCyan;

            DisplayHeader("Monster Info");

            Console.WriteLine(">> Sea Monster");
            Console.WriteLine();
            Console.WriteLine($"Id: {seaMonster.Id}");
            Console.WriteLine();
            Console.WriteLine($"Name: {seaMonster.Name}");
            Console.WriteLine();
            Console.WriteLine($"Age: {seaMonster.Age} Years Old");
            Console.WriteLine();
            Console.WriteLine($"Is Active: {(seaMonster.IsActive ? "Yes" : "No")}");
            Console.WriteLine();
            Console.WriteLine($"Is Happy: {(seaMonster.IsHappy() ? "Yes" : "No")}");
            Console.WriteLine();
            Console.WriteLine($"Is Hungry: {(seaMonster.IsHungry() ? "Yes" : "No")}");
            Console.WriteLine();
            Console.WriteLine($"Has Gills: {(seaMonster.HasGills ? "Yes" : "No")}");
            Console.WriteLine();
            Console.WriteLine($"Home Sea: {seaMonster.SeaName}");
            Console.WriteLine();

            seaMonster.Greeting();

            Console.WriteLine($"You attack {seaMonster.Name}, and they {seaMonster.MonsterBattleResponse()}");

            seaMonster.Farewell();

            Console.ReadKey();

            Console.Clear();
        }
Beispiel #2
0
        static void DisplayMonsterInfoScreen(SeaMonster seaMonster, SpaceMonster spaceMonster, LavaMonster lavaMonster)
        {
            DisplayHeader("Monster Info");

            DisplaySeaMonster(seaMonster);

            Console.WriteLine();

            DisplaySpaceMonster(spaceMonster);

            Console.WriteLine();

            DisplayLavaMonster(lavaMonster);

            Console.WriteLine();


            DisplayContinuePrompt();
        }
Beispiel #3
0
        private static void DisplayMenu()
        {
            DisplayHeader("Menu");
            bool exiting = false;

            string       menuchoice;
            SeaMonster   Lannerbeck = InitializeSeaMonster();
            SpaceMonster Yngwie     = InitializeSpaceMonster();
            LavaMonster  Johannes   = InitializeLavaMonster();

            while (!exiting)
            {
                Console.ForegroundColor = ConsoleColor.Blue;
                DisplayHeader("Main Menu");
                Console.WriteLine();
                Console.WriteLine("1) Display Monsters");
                Console.WriteLine();
                Console.WriteLine("2) Exit");
                Console.WriteLine();
                Console.WriteLine("Enter Choice");
                Console.WriteLine();
                menuchoice = Console.ReadLine();

                switch (menuchoice)
                {
                case "1": Console.Clear();
                    DisplayMonsterInfoScreen(Lannerbeck, Yngwie, Johannes);
                    break;

                case "2": exiting = true;
                    break;

                default:
                    Console.Clear();
                    Console.WriteLine("Please enter a valid choice");
                    DisplayContinuePrompt();
                    Console.Clear();
                    break;
                }
            }
        }