From 5d965f43899cf6436153f233b5141e6c2e26a8b8 Mon Sep 17 00:00:00 2001 From: Yoshae101 <29238660@students.lincoln.ac.uk> Date: Thu, 13 Mar 2025 09:57:53 +0000 Subject: [PATCH 1/3] Development --- Location.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Location.cs diff --git a/Location.cs b/Location.cs new file mode 100644 index 00000000..169ec414 --- /dev/null +++ b/Location.cs @@ -0,0 +1,24 @@ +namespace DungeonExplorer +{ + public class Location + { + public string Name { get; private set; } + public string Description { get; private set; } + public string Item { get; private set; } + + public Location(string name, string description, string item) + { + Name = name; + Description = description; + Item = item; + } + + // When picking up the item, return it and remove it from the location. + public string PickUpItem() + { + string foundItem = Item; + Item = null; + return foundItem; + } + } +} From 5c050cd22546a51db59d339f218ad1913f117520 Mon Sep 17 00:00:00 2001 From: Yoshae101 <29238660@students.lincoln.ac.uk> Date: Thu, 13 Mar 2025 09:59:11 +0000 Subject: [PATCH 2/3] dungeon explorer foundation submission for review --- .vscode/settings.json | 3 ++ DungeonExplorer.csproj | 1 + Game.cs | 71 +++++++++++++++++++++++++++++++++++++----- Location.cs | 4 +++ Player.cs | 39 ++++++++++++++++------- Room.cs | 54 ++++++++++++++++++++++++++++++-- 6 files changed, 151 insertions(+), 21 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..013007bb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.preferCSharpExtension": true +} \ No newline at end of file diff --git a/DungeonExplorer.csproj b/DungeonExplorer.csproj index 32ff6101..f77ac762 100644 --- a/DungeonExplorer.csproj +++ b/DungeonExplorer.csproj @@ -48,6 +48,7 @@ + diff --git a/Game.cs b/Game.cs index dacdc422..f322d533 100644 --- a/Game.cs +++ b/Game.cs @@ -1,26 +1,81 @@ using System; -using System.Media; namespace DungeonExplorer { - internal class Game + public class Game { private Player player; private Room currentRoom; public Game() { - // Initialize the game with one room and one player + // Initialize player with a name and starting health. + Console.Write("Enter your name: "); + string playerName = Console.ReadLine(); + if (string.IsNullOrWhiteSpace(playerName)) + { + Console.WriteLine("Name cannot be empty. Using default name 'Steve'."); + playerName = "Steve"; + } + player = new Player(playerName, 100); + // Create the room with the provided description. + currentRoom = new Room( + "As you push open the rustic wooden doors, the air thickens. The Orcs throne glistens from the dying flame in the centre of the floor. " + + "The rugged red carpet underneath your feet tears as you tread into the room, the breeze from the hall follows you in giving life back to the now roaring fire. " + + "The room, now engulfed in a flickering light, uncovers the throne room from its dark veil ... you decide to explore the room." + ); } + public void Start() { - // Change the playing logic into true and populate the while loop - bool playing = false; - while (playing) + Console.WriteLine("\nGame started...\n"); + + // Display the room's description. + Console.WriteLine(currentRoom.GetDescription()); + Console.WriteLine(); + + // Show travel options until all items have been collected. + while (currentRoom.HasRemainingItems()) + { + Console.WriteLine("Where would you like to check out? Choose an option by number:"); + currentRoom.ShowLocations(); + + int choice = GetUserChoice(); + // Valid index check (user enters 1-4) + if (choice < 1 || choice > currentRoom.Locations.Count) + { + Console.WriteLine("Invalid option. Please choose a valid number."); + continue; + } + + // Pick up the item (if available) from the chosen location. + string itemFound = currentRoom.PickUpItemFromLocation(choice - 1); + if (itemFound != null) + { + player.PickUpItem(itemFound); + } + Console.WriteLine("\nPlayer Status:"); + Console.WriteLine(player.GetStatus()); + Console.WriteLine(); + } + + Console.WriteLine("All items have been collected. You have explored every location!"); + Console.WriteLine("Press any key to exit the game."); + Console.ReadKey(); + } + + private int GetUserChoice() + { + Console.Write("Option: "); + string input = Console.ReadLine(); + int option; + if (int.TryParse(input, out option)) { - // Code your playing logic here + return option; } + return -1; } } -} \ No newline at end of file +} + diff --git a/Location.cs b/Location.cs index 169ec414..832a2890 100644 --- a/Location.cs +++ b/Location.cs @@ -1,3 +1,7 @@ +using System; +using System.Collections.Generic; +using DungeonExplorer; + namespace DungeonExplorer { public class Location diff --git a/Player.cs b/Player.cs index 21cc773f..28b639f3 100644 --- a/Player.cs +++ b/Player.cs @@ -1,25 +1,42 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace DungeonExplorer { public class Player { - public string Name { get; private set; } - public int Health { get; private set; } - private List inventory = new List(); + private string name; + private int health; + private List inventory; - public Player(string name, int health) + public Player(string name, int health) { - Name = name; - Health = health; + this.name = name; + this.Health = health; + inventory = new List(); } - public void PickUpItem(string item) + + public string Name { + get { return name; } + } + public int Health + { + get { return health; } + set { health = value < 0 ? 0 : value; } } - public string InventoryContents() + + public void PickUpItem(string item) + { + inventory.Add(item); + Console.WriteLine($"{name} picked up {item}."); + } + + public string GetStatus() { - return string.Join(", ", inventory); + string invStatus = (inventory.Count > 0) ? string.Join(", ", inventory) : "No items"; + return $"Player: {name}\nHealth: {health}\nInventory: {invStatus}"; } } -} \ No newline at end of file +} diff --git a/Room.cs b/Room.cs index cb092efb..9b2d38bd 100644 --- a/Room.cs +++ b/Room.cs @@ -1,17 +1,67 @@ -namespace DungeonExplorer +using System; +using System.Collections.Generic; +using DungeonExplorer; + +namespace DungeonExplorer { public class Room { private string description; + public List Locations { get; private set; } public Room(string description) { this.description = description; + // Create four locations with specific items. + Locations = new List + { + new Location("Warped Wooden Table", "A creaky wooden table, scarred by time.", "Healing Chalice"), + new Location("Used Armour Set on a Statue", "An old armour set resting on a broken statue.", "Shield"), + new Location("Mural on the Wall", "A faded mural depicting ancient battles, with something glinting on its side.", "Key"), + new Location("Next to the Throne", "A grand throne with a sword laid across its seat.", "Sword") + }; } public string GetDescription() { return description; } + + // Display a list of locations and check if an item is available. + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + string status = Locations[i].Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {Locations[i].Name} - {Locations[i].Description} ({status})"); + } + } + + // Checks if any location still has an item. + public bool HasRemainingItems() + { + foreach (var loc in Locations) + { + if (loc.Item != null) + return true; + } + return false; + } + + // When a location is visited, pick up the item if available. + public string PickUpItemFromLocation(int index) + { + Location loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou travel to the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + else + { + Console.WriteLine($"\nYou travel to the {loc.Name} but find nothing of value."); + return null; + } + } } -} \ No newline at end of file +} From aa40076e675b6aac94c42969ad763d19199536c3 Mon Sep 17 00:00:00 2001 From: Yoshae101 <29238660@students.lincoln.ac.uk> Date: Thu, 1 May 2025 11:52:35 +0100 Subject: [PATCH 3/3] Assignment 2 Commit Final Commit --- Battle.cs | 87 ++++++++++++++++++++++++++ CMP1903M_2425_A01_Report (1).docx | Bin 0 -> 25629 bytes DungeonExplorer.csproj | 9 ++- Game.cs | 98 +++++++++++++++-------------- Location.cs | 8 +-- Orcs.cs | 43 +++++++++++++ Player.cs | 33 ++++++++-- Room.cs | 67 -------------------- RoomBase.cs | 44 +++++++++++++ RoomFive.cs | 97 +++++++++++++++++++++++++++++ RoomFour.cs | 98 +++++++++++++++++++++++++++++ RoomOne.cs | 49 +++++++++++++++ RoomThree.cs | 100 ++++++++++++++++++++++++++++++ RoomTwo.cs | 87 ++++++++++++++++++++++++++ 14 files changed, 697 insertions(+), 123 deletions(-) create mode 100644 Battle.cs create mode 100644 CMP1903M_2425_A01_Report (1).docx create mode 100644 Orcs.cs delete mode 100644 Room.cs create mode 100644 RoomBase.cs create mode 100644 RoomFive.cs create mode 100644 RoomFour.cs create mode 100644 RoomOne.cs create mode 100644 RoomThree.cs create mode 100644 RoomTwo.cs diff --git a/Battle.cs b/Battle.cs new file mode 100644 index 00000000..5a0f2d4a --- /dev/null +++ b/Battle.cs @@ -0,0 +1,87 @@ +using System; + +namespace DungeonExplorer +{ + public static class Battle // When enounter is called he battle is initiated + { + private static Random rng = new Random(); + + public static void Start(Player player, Orc orc) + { + Console.WriteLine($"\nA wild {orc.Name} appears! Prepare for battle!\n"); + + while (player.Health > 0 && orc.Health > 0) + { + Console.WriteLine("Your Turn:"); + Console.WriteLine("1. Attack"); + Console.WriteLine("2. Block"); + Console.Write("Choose your action: "); + string input = Console.ReadLine(); + int playerDamage = player.GetAttackDamage(); + + bool playerBlocked = false; + + switch (input) + { + case "1": + if (rng.NextDouble() < 0.1) // Creates a potential for YOU to miss an attack + { + Console.WriteLine("You missed your attack!"); + } + else + { + if (rng.NextDouble() < 0.2) // Creates a potential that the orc blocks your attack + { + Console.WriteLine($"{orc.Name} blocked your attack!"); + } + else + { + orc.Health -= playerDamage; // Player Deals Damage to Orc + Console.WriteLine($"You hit the {orc.Name} for {playerDamage} damage.\n"); + } + } + break; + case "2": + playerBlocked = true; + Console.WriteLine("You brace yourself and prepare to block the next attack.\n"); + break; + default: + Console.WriteLine("Invalid input. You lost your turn."); + break; + } + + if (orc.Health <= 0) break; + + Console.WriteLine("Enemy Turn:"); + if (rng.NextDouble() < 0.1) // Creates A Potential For The Orc To Miss An Attack + { + Console.WriteLine($"{orc.Name} missed their attack!\n"); + } + else + { + int damage = orc.Damage; + if (playerBlocked) + { + damage /= 2; + Console.WriteLine($"You partially blocked the attack! You receive {damage} damage."); + } + else + { + Console.WriteLine($"{orc.Name} hits you for {damage} damage."); + } + player.Health -= damage; + } + + Console.WriteLine($"\nPlayer Health: {player.Health}"); + Console.WriteLine($"{orc.Name} Health: {orc.Health}\n"); + } + + if (player.Health > 0) + Console.WriteLine($"You defeated the {orc.Name}!"); + else + Console.WriteLine("You were defeated. Game Over."); + + Console.WriteLine(); + } + } +} diff --git a/CMP1903M_2425_A01_Report (1).docx b/CMP1903M_2425_A01_Report (1).docx new file mode 100644 index 0000000000000000000000000000000000000000..ea422be48a8fe0edb3e98a78e306dfc5b7c63045 GIT binary patch literal 25629 zcmeFXbChLIwyo2Ks+p2@64i zDf0n;4gY`ozj*|zljLMTm=MEmg1(8Sx_LIKi5Ir@MbG3+KY>J;{{&_sB$c;(?`R_G zm02V3ncvSOTZC0{c=J@a$64Oi1eqxX8JBir>1y;_KQy&L{0zx1nCGe4>w{u{dRl%D zl}Or3c_$+MNky+V7aamIRP5c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!wJ)Ie;qke1FXH6}K8WzEeSa>%06;g%Z}|Vy1qhJ|vFXYMR~*@ICd3vjh!lu1 z_6v%@yZ_paF4Y|o;a9_$7hnJYjTZ2yXeJ`T)!^Y}0!=zZf{Pd;BFoh%+hrD621J(g zWf+m*YDDZZ!K3?#1m~CWN0zJcsLL#G7!g^{R|CY$xN32}OmNDMNN|1`e`G;)$6oMY za{V6DD_&W|t3WiJUEnu)|JB5QENF;e#On10ctP?v7@?Mp$beX0y^Zu*ouh1 zTJgF-0{|Ry0Kk9MzYyWHR|*f8;VTN4;J?cdi0G>a$;)U>_nd z68O`(0+H+LuJj6*`k%Qj_Na(lS9ds9xHSLFb+O<1#YJ@fU&fzT%L}$x?LV%a@=|E< T*fIb>0>4+nn{G(!{(AR+*2(O{ literal 0 HcmV?d00001 diff --git a/DungeonExplorer.csproj b/DungeonExplorer.csproj index f77ac762..6bb27bb6 100644 --- a/DungeonExplorer.csproj +++ b/DungeonExplorer.csproj @@ -43,12 +43,19 @@ + + - + + + + + + diff --git a/Game.cs b/Game.cs index f322d533..4d5981d0 100644 --- a/Game.cs +++ b/Game.cs @@ -1,15 +1,19 @@ using System; +using System.Runtime.InteropServices; namespace DungeonExplorer { public class Game { private Player player; - private Room currentRoom; + private RoomOne roomOne; + private RoomTwo roomTwo; + private RoomThree roomThree; + private RoomFour roomFour; + private RoomFive roomFive; public Game() { - // Initialize player with a name and starting health. Console.Write("Enter your name: "); string playerName = Console.ReadLine(); if (string.IsNullOrWhiteSpace(playerName)) @@ -18,64 +22,66 @@ public Game() playerName = "Steve"; } player = new Player(playerName, 100); - - // Create the room with the provided description. - currentRoom = new Room( - "As you push open the rustic wooden doors, the air thickens. The Orcs throne glistens from the dying flame in the centre of the floor. " + - "The rugged red carpet underneath your feet tears as you tread into the room, the breeze from the hall follows you in giving life back to the now roaring fire. " + - "The room, now engulfed in a flickering light, uncovers the throne room from its dark veil ... you decide to explore the room." - ); + roomOne = new RoomOne("\n You Slowly Push The Dungeon Doors Open Stumbling Down The Rocky Cavern, The Torch Lit Halls Flicker With Light\n " + + " You Reach A Wooden Door Which Swings Open To The Orcs Armoury - Bloodstained Weapons Are Hung on the wall but they still flicker with light \n" + + "You peer around the corner two old armour stands are idle in the room the armour looking new and polished untouched by war \n" + + "... You delve into the room to see whats around ..."); ; + roomTwo = new RoomTwo("\n You Pull Open A Door Handle, Its Rusted Iron Handle Chips In Your Hand It Opens Revealing A Cafeteria With An Orc Finishing Off His Meal \n"); + roomThree = new RoomThree("\n You Hear Metal Clanging Through The Door You Rush Through Clutching Your Sword To See What Thw Noise Is -" + +"\n An Orc Drops His Tools And Grabs The Strong Sword He Has Just Finished Tempering \n"); + roomFour = new RoomFour("The Blacksmiths Go Silent As The Flames Burn Out, A Chime Comes From A Door With A Cross On\n"+ + "You Tap The Door With Your New Sword As It Swings Open Revealing the Orcs Church"); + roomFive = new RoomFive("The Guard Topples Over Making A Horriffic Screach - You Hear A Massive Pound Come From The Double Doors Off to the Side \n"+ + "You Jam The Key You Found In the Armoury Into The Lock And With A Hard Twist The Doors Swing Open Revealing The King And His Throne"); } public void Start() { - Console.WriteLine("\nGame started...\n"); - - // Display the room's description. - Console.WriteLine(currentRoom.GetDescription()); - Console.WriteLine(); + Console.WriteLine("\n--- Room One: The Armory ---\n"); + Console.WriteLine(roomOne.GetDescription() + "\n"); - // Show travel options until all items have been collected. - while (currentRoom.HasRemainingItems()) + while (roomOne.HasRemainingItems()) { - Console.WriteLine("Where would you like to check out? Choose an option by number:"); - currentRoom.ShowLocations(); - - int choice = GetUserChoice(); - // Valid index check (user enters 1-4) - if (choice < 1 || choice > currentRoom.Locations.Count) - { - Console.WriteLine("Invalid option. Please choose a valid number."); - continue; - } - - // Pick up the item (if available) from the chosen location. - string itemFound = currentRoom.PickUpItemFromLocation(choice - 1); - if (itemFound != null) + Console.WriteLine("Choose a location to search:"); + roomOne.ShowLocations(); + int choice = GetUserChoice(1, roomOne.Locations.Count); + var item = roomOne.PickUpItemFromLocation(choice - 1); + if (item != null) { - player.PickUpItem(itemFound); + player.PickUpItem(item); } - Console.WriteLine("\nPlayer Status:"); - Console.WriteLine(player.GetStatus()); - Console.WriteLine(); + Console.WriteLine("\n" + player.GetStatus() + "\n"); } + Console.WriteLine("You collected all items in Room One.\n"); - Console.WriteLine("All items have been collected. You have explored every location!"); - Console.WriteLine("Press any key to exit the game."); - Console.ReadKey(); + Console.WriteLine("\n--- Room Two: Cafeteria ---\n"); + roomTwo.Enter(player); + if (player.Health <= 0) return; + + Console.WriteLine("\n--- Room Three: Blacksmith's Forge ---\n"); + roomThree.Enter(player); + if (player.Health <= 0) return; + + Console.WriteLine("\n--- Room Four: The Church ---\n"); + roomFour.Enter(player); + if (player.Health <= 0) return; + + Console.WriteLine("\n--- Room Five: Throne Room ---\n"); + roomFive.Enter(player); } - private int GetUserChoice() + private int GetUserChoice(int min, int max) { - Console.Write("Option: "); - string input = Console.ReadLine(); - int option; - if (int.TryParse(input, out option)) + while (true) { - return option; + Console.Write("Option: "); + string input = Console.ReadLine(); + if (int.TryParse(input, out int opt) && opt >= min && opt <= max) + { + return opt; + } + Console.WriteLine($"Please enter a number between {min} and {max}."); } - return -1; } } -} - +} \ No newline at end of file diff --git a/Location.cs b/Location.cs index 832a2890..065e3de6 100644 --- a/Location.cs +++ b/Location.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using DungeonExplorer; namespace DungeonExplorer { @@ -10,15 +8,14 @@ public class Location public string Description { get; private set; } public string Item { get; private set; } - public Location(string name, string description, string item) + public Location(string name, string description, string item) //Class For Creating POIs in Rooms { Name = name; Description = description; Item = item; } - // When picking up the item, return it and remove it from the location. - public string PickUpItem() + public string PickUpItem() // Allows the player to pick up items { string foundItem = Item; Item = null; @@ -26,3 +23,4 @@ public string PickUpItem() } } } + diff --git a/Orcs.cs b/Orcs.cs new file mode 100644 index 00000000..d8a9702b --- /dev/null +++ b/Orcs.cs @@ -0,0 +1,43 @@ +using System; +using DungeonExplorer; + +namespace DungeonExplorer +{ + public class Orc // Enemy Class + { + public string Name { get; private set; } + public int Health { get; set; } + public int Damage { get; private set; } + + public Orc(string name, int health, int damage) + { + Name = name; + Health = health; + Damage = damage; + } + + + + // Specifying Which Orcs Can Spawn In + public class OrcGrunt : Orc + { + public OrcGrunt() : base("Orc Grunt", 20, 5) { } + } + + public class OrcSoldier : Orc + { + public OrcSoldier() : base("Orc Soldier", 70, 15) { } + } + + public class OrcWarlord : Orc + { + public OrcWarlord() : base("Orc Warlord", 100, 20) { } + } + + public class OrcKing : Orc + { + public OrcKing() : base("Orc King", 150, 25) { } + } + } +} + diff --git a/Player.cs b/Player.cs index 28b639f3..64112f14 100644 --- a/Player.cs +++ b/Player.cs @@ -16,10 +16,7 @@ public Player(string name, int health) inventory = new List(); } - public string Name - { - get { return name; } - } + public string Name { get { return name; } } public int Health { @@ -31,6 +28,26 @@ public void PickUpItem(string item) { inventory.Add(item); Console.WriteLine($"{name} picked up {item}."); + + // Picking up armour increases health + if (item == "Helmet") + { + Health += 25; + Console.WriteLine("The Orc's Helmet Fits Your Head Perfectly - Your Health Increased by 25!"); + } + if (item == "Chestplate") + { + Health += 50; + Console.WriteLine("Its A Squeeze To Get Into However ... It fits - Your Health Increased by 50"); + + } + + if (item == "Health Potion") + { + int healAmount = 75; // Heal amount for health potion + Health += healAmount; + Console.WriteLine($"You Gulp Down The Healing Potion - It Tastes Horrible But Your Wounds Heal - Your health restored by 75"); + } } public string GetStatus() @@ -38,5 +55,13 @@ public string GetStatus() string invStatus = (inventory.Count > 0) ? string.Join(", ", inventory) : "No items"; return $"Player: {name}\nHealth: {health}\nInventory: {invStatus}"; } + + public int GetAttackDamage() + { + int damage = 10; // Default damage + if (inventory.Contains("Strong Sword")) + damage += 15; // Additional damage from Strong Sword + return damage; + } } } diff --git a/Room.cs b/Room.cs deleted file mode 100644 index 9b2d38bd..00000000 --- a/Room.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using DungeonExplorer; - -namespace DungeonExplorer -{ - public class Room - { - private string description; - public List Locations { get; private set; } - - public Room(string description) - { - this.description = description; - // Create four locations with specific items. - Locations = new List - { - new Location("Warped Wooden Table", "A creaky wooden table, scarred by time.", "Healing Chalice"), - new Location("Used Armour Set on a Statue", "An old armour set resting on a broken statue.", "Shield"), - new Location("Mural on the Wall", "A faded mural depicting ancient battles, with something glinting on its side.", "Key"), - new Location("Next to the Throne", "A grand throne with a sword laid across its seat.", "Sword") - }; - } - - public string GetDescription() - { - return description; - } - - // Display a list of locations and check if an item is available. - public void ShowLocations() - { - for (int i = 0; i < Locations.Count; i++) - { - string status = Locations[i].Item != null ? "Item available" : "Empty"; - Console.WriteLine($"{i + 1}. {Locations[i].Name} - {Locations[i].Description} ({status})"); - } - } - - // Checks if any location still has an item. - public bool HasRemainingItems() - { - foreach (var loc in Locations) - { - if (loc.Item != null) - return true; - } - return false; - } - - // When a location is visited, pick up the item if available. - public string PickUpItemFromLocation(int index) - { - Location loc = Locations[index]; - if (loc.Item != null) - { - Console.WriteLine($"\nYou travel to the {loc.Name} and find a {loc.Item}!"); - return loc.PickUpItem(); - } - else - { - Console.WriteLine($"\nYou travel to the {loc.Name} but find nothing of value."); - return null; - } - } - } -} diff --git a/RoomBase.cs b/RoomBase.cs new file mode 100644 index 00000000..f723712a --- /dev/null +++ b/RoomBase.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DungeonExplorer +{ + public abstract class Room // Base Class For Room Makes Rooms Accessible From The Game.cs Script + { + public string Description { get; protected set; } + public List Locations { get; private set; } + + public Room(string description) + { + Description = description; + Locations = new List(); + } + + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + var loc = Locations[i]; + string status = loc.Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {loc.Name} - {loc.Description} ({status})"); + } + } + + public bool HasRemainingItems() => Locations.Exists(loc => loc.Item != null); + + public string PickUpItemFromLocation(int index) + { + var loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou search the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + Console.WriteLine($"\nYou search the {loc.Name} but find nothing."); + return null; + } + } +} diff --git a/RoomFive.cs b/RoomFive.cs new file mode 100644 index 00000000..62d50026 --- /dev/null +++ b/RoomFive.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; + +namespace DungeonExplorer +{ + public class RoomFive : Room + { + private string description; + public List Locations { get; private set; } + + public RoomFive(string description) : base(description) + { + this.description = description; + Locations = new List + { + new Location("Throne", "A grand throne, now empty, with the orc king waiting to face you.", null) + }; + } + + public string GetDescription() => description; + + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + var loc = Locations[i]; + string status = loc.Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {loc.Name} - {loc.Description} ({status})"); + } + } + + public bool HasRemainingItems() => Locations.Exists(loc => loc.Item != null); + + public string PickUpItemFromLocation(int index) + { + var loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou search the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + Console.WriteLine($"\nYou search the {loc.Name} but find nothing."); + return null; + } + + // Encounter with the Orc King + public void Encounter(Player player) + { + Orc orc = new Orc("Orc King", 150, 25); + Battle.Start(player, orc); + + if (player.Health > 0) + { + Console.WriteLine("You have defeated the Orc King and completed your journey!"); + } + } + + public void Enter(Player player) + { + Console.WriteLine(GetDescription() + "\n"); + + Encounter(player); + if (player.Health <= 0) return; + + while (HasRemainingItems()) + { + Console.WriteLine("Choose a location to search:"); + ShowLocations(); + + int choice = GetUserChoice(1, Locations.Count); + var item = PickUpItemFromLocation(choice - 1); + if (item != null) + { + player.PickUpItem(item); + } + + Console.WriteLine("\n" + player.GetStatus() + "\n"); + } + + Console.WriteLine("You have explored all of Room Five.\n"); + } + + private int GetUserChoice(int min, int max) + { + while (true) + { + Console.Write("Option: "); + string input = Console.ReadLine(); + if (int.TryParse(input, out int opt) && opt >= min && opt <= max) + { + return opt; + } + Console.WriteLine($"Please enter a number between {min} and {max}."); + } + } + } +} diff --git a/RoomFour.cs b/RoomFour.cs new file mode 100644 index 00000000..d1b1ac1a --- /dev/null +++ b/RoomFour.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; + +namespace DungeonExplorer +{ + public class RoomFour : Room + { + private string description; + public List Locations { get; private set; } + + public RoomFour(string description) : base(description) + { + this.description = description; + Locations = new List + { + new Location("Altar", "A grand altar with inscriptions, dark and foreboding.", "Health Potion"), + new Location("Grand Door", "A massive door that leads further into the dungeon, guarded by the orc warlord.", null) + }; + } + + public string GetDescription() => description; + + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + var loc = Locations[i]; + string status = loc.Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {loc.Name} - {loc.Description} ({status})"); + } + } + + public bool HasRemainingItems() => Locations.Exists(loc => loc.Item != null); + + public string PickUpItemFromLocation(int index) + { + var loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou search the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + Console.WriteLine($"\nYou search the {loc.Name} but find nothing."); + return null; + } + + public void Encounter(Player player) + { + Orc orc = new Orc("Orc Warlord", 100, 20); + Battle.Start(player, orc); + + if (player.Health > 0) + { + Console.WriteLine("The orc warlord drops a health potion! You can pick it up."); + PickUpItemFromLocation(0); + } + } + + public void Enter(Player player) + { + Console.WriteLine(GetDescription() + "\n"); + + Encounter(player); + if (player.Health <= 0) return; + + while (HasRemainingItems()) + { + Console.WriteLine("Choose a location to search:"); + ShowLocations(); + + int choice = GetUserChoice(1, Locations.Count); + var item = PickUpItemFromLocation(choice - 1); + if (item != null) + { + player.PickUpItem(item); + } + + Console.WriteLine("\n" + player.GetStatus() + "\n"); + } + + Console.WriteLine("You collected all items in Room Four.\n"); + } + + private int GetUserChoice(int min, int max) + { + while (true) + { + Console.Write("Option: "); + string input = Console.ReadLine(); + if (int.TryParse(input, out int opt) && opt >= min && opt <= max) + { + return opt; + } + Console.WriteLine($"Please enter a number between {min} and {max}."); + } + } + } +} diff --git a/RoomOne.cs b/RoomOne.cs new file mode 100644 index 00000000..6274579f --- /dev/null +++ b/RoomOne.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; + +namespace DungeonExplorer +{ + public class RoomOne : Room + { + private string description; + public List Locations { get; private set; } + + public RoomOne(string description) : base(description) + { + this.description = description; + Locations = new List // Creates The POIs in Room One + { + new Location("Weapon Rack", "A rack filled with rusted weapons, but something glints among them.", "Old Sword"), + new Location("Wooden Crate", "A battered crate with something inside.", "Shield"), + new Location("Armor Stand", "A broken suit of armor that might still have useful parts.", "Helmet"), + new Location("Wall Hooks", "Hooks that once held weapons. One still hangs there.", "Throne Room Key") + }; + } + + public string GetDescription() => description; + + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + var loc = Locations[i]; + string status = loc.Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {loc.Name} - {loc.Description} ({status})"); + } + } + + public bool HasRemainingItems() => Locations.Exists(loc => loc.Item != null); + + public string PickUpItemFromLocation(int index) + { + var loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou search the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + Console.WriteLine($"\nYou search the {loc.Name} but find nothing."); + return null; + } + } +} diff --git a/RoomThree.cs b/RoomThree.cs new file mode 100644 index 00000000..dc3dbe86 --- /dev/null +++ b/RoomThree.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; + +namespace DungeonExplorer +{ + public class RoomThree : Room + { + private string description; + public List Locations { get; private set; } + + public RoomThree(string description) : base(description) + { + this.description = description; + Locations = new List + { + new Location("Forge", "A large forge with glowing embers and unfinished weapons.", "Health Potion"), + new Location("Work Bench", "A workbench with a sword resting on it, waiting for refinement.", "Strong Sword") + }; + } + + public string GetDescription() => description; + + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + var loc = Locations[i]; + string status = loc.Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {loc.Name} - {loc.Description} ({status})"); + } + } + + public bool HasRemainingItems() => Locations.Exists(loc => loc.Item != null); + + public string PickUpItemFromLocation(int index) + { + var loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou search the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + Console.WriteLine($"\nYou search the {loc.Name} but find nothing."); + return null; + } + + public void Encounter(Player player) + { + Orc orc = new Orc("Orc Soldier", 70, 15); + Battle.Start(player, orc); + + if (player.Health > 0) + { + Console.WriteLine("The orc drops a healing potion and a sword! You can pick them up."); + PickUpItemFromLocation(0); + PickUpItemFromLocation(1); + } + } + + public void Enter(Player player) + { + Console.WriteLine(GetDescription() + "\n"); + + Encounter(player); + + if (player.Health <= 0) return; + + while (HasRemainingItems()) + { + Console.WriteLine("Choose a location to search:"); + ShowLocations(); + + int choice = GetUserChoice(1, Locations.Count); + var item = PickUpItemFromLocation(choice - 1); + if (item != null) + { + player.PickUpItem(item); + } + + Console.WriteLine("\n" + player.GetStatus() + "\n"); + } + + Console.WriteLine("You Push Over The Hot Iron Tools However Cant Find Anything Else Worth Gathering.\n"); + } + + private int GetUserChoice(int min, int max) + { + while (true) + { + Console.Write("Option: "); + string input = Console.ReadLine(); + if (int.TryParse(input, out int opt) && opt >= min && opt <= max) + { + return opt; + } + Console.WriteLine($"Please enter a number between {min} and {max}."); + } + } + } +} diff --git a/RoomTwo.cs b/RoomTwo.cs new file mode 100644 index 00000000..30cd9de1 --- /dev/null +++ b/RoomTwo.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; + +namespace DungeonExplorer +{ + public class RoomTwo : Room + { + private string description; + public List Locations { get; private set; } + + public RoomTwo(string description) : base(description) + { + this.description = description; + Locations = new List + { + new Location("Benches", "A few benches with some broken plates around.", "Health Potion"), + new Location("Broken Plates", "Rusty and old plates scattered on the floor.", "Chestplate") + }; + } + + public string GetDescription() => description; + + public void ShowLocations() + { + for (int i = 0; i < Locations.Count; i++) + { + var loc = Locations[i]; + string status = loc.Item != null ? "Item available" : "Empty"; + Console.WriteLine($"{i + 1}. {loc.Name} - {loc.Description} ({status})"); + } + } + + public bool HasRemainingItems() => Locations.Exists(loc => loc.Item != null); + + public string PickUpItemFromLocation(int index) + { + var loc = Locations[index]; + if (loc.Item != null) + { + Console.WriteLine($"\nYou search the {loc.Name} and find a {loc.Item}!"); + return loc.PickUpItem(); + } + Console.WriteLine($"\nYou search the {loc.Name} but find nothing."); + return null; + } + + public void Encounter(Player player) // Creates the battle event + { + Orc orc = new Orc("Orc Grunt", 20, 5); + Battle.Start(player, orc); + + if (player.Health > 0) + { + Console.WriteLine("The orc drops a health potion! You can pick it up."); + PickUpItemFromLocation(0); // Auto-pick health potion from Benches + } + } + + public void Enter(Player player) // Allows the player to enter the room + { + Console.WriteLine(GetDescription()); + Encounter(player); + if (player.Health <= 0) return; + + while (HasRemainingItems() && player.Health > 0) + { + Console.WriteLine("\nChoose a location to search:"); + ShowLocations(); + Console.Write("Option: "); + if (int.TryParse(Console.ReadLine(), out int choice) && choice >= 1 && choice <= Locations.Count) + { + var item = PickUpItemFromLocation(choice - 1); + if (item != null) + { + player.PickUpItem(item); + } + } + else + { + Console.WriteLine("Invalid Input!"); + } + } + + Console.WriteLine("You Rummage Around But Can't Find Anything More Of Value In The Cafeteria"); + } + } +}