Welcome to OOP-Adventure, a text-based adventure game that demonstrates object-oriented programming principles. In this game, you will embark on a thrilling adventure where you can explore rooms, take various actions, and collect and use items. This readme file will provide you with essential information on how to play the game and an overview of the project's design.
OOP-Adventure is a text adventure game that showcases various object-oriented programming (OOP) concepts such as abstract classes, interfaces, generic types, the command pattern, method overrides, composition pattern, and more. In this game, you will take on the role of an adventurer exploring a mysterious house filled with rooms and items.
To play OOP-Adventure, follow these steps:
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone <repository-url>
-
Compile the Code: Compile the code to build the console application. You may use your preferred C# development environment or use the command line to compile the project.
-
Run the Game: Execute the compiled application to start playing the game:
dotnet run
-
Follow On-Screen Instructions: Once the game starts, you will be prompted to enter your name. After entering your name, you will be placed inside the mysterious house, ready to begin your adventure.
OOP-Adventure offers an immersive gameplay experience with the following features:
-
Actions: Use the arrow keys to navigate through available actions and press Enter to select the action you want to take. These actions can include interacting with objects, talking to characters, and more.
-
Direction: You can also use the arrow keys to navigate through available directions (e.g., north, south, east, west) to move between rooms within the house.
-
Item Management: As you explore rooms, you can collect items and add them to your inventory. You can use these items at the appropriate times to solve puzzles and progress through the game.
OOP-Adventure showcases several design patterns, including:
-
Command Pattern: Used to implement actions that the player can take. Each action is encapsulated in a command object, making it easy to add, remove, or modify actions.
-
Composition Pattern: Utilized for managing the player's inventory and the items they collect. Items are composed within the player's inventory object, allowing for dynamic item management.
If you have ideas for new features, improvements, or bug fixes, please submit a pull request. For major changes, please open an issue first to discuss the proposed changes.
This project is licensed under the MIT License - see the LICENSE file for details.