static void DisplayLavaMonster(LavaMonster lavaMonster) { Console.ForegroundColor = ConsoleColor.Red; DisplayHeader("Monster Info"); Console.WriteLine(">> Lava Monster"); Console.WriteLine(); Console.WriteLine($"Id: {lavaMonster.Id}"); Console.WriteLine(); Console.WriteLine($"Name: {lavaMonster.Name}"); Console.WriteLine(); Console.WriteLine($"Age: {lavaMonster.Age} Years Old"); Console.WriteLine(); Console.WriteLine($"Is Active: {(lavaMonster.IsActive ? "Yes" : "No")}"); Console.WriteLine(); Console.WriteLine($"Is Happy: {(lavaMonster.IsHungry() ? "Yes" : "No")}"); Console.WriteLine(); Console.WriteLine($"Has Fury: {(lavaMonster.HasFury ? "Yes" : "No")}"); Console.WriteLine(); lavaMonster.Greeting(); Console.WriteLine($"You attack {lavaMonster.Name}, and they {lavaMonster.MonsterBattleResponse()}"); Console.WriteLine(); lavaMonster.Farewell(); Console.ReadKey(); Console.Clear(); }
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; } } }
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(); }