Code Monkey home page Code Monkey logo

oop-adventure's Introduction

OOP-Adventure: Text Adventure Game

Preview

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.

Table of Contents

  1. Introduction
  2. Getting Started
  3. Gameplay
  4. Design Patterns
  5. Contributing
  6. License

Introduction

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.

Getting Started

To play OOP-Adventure, follow these steps:

  1. Clone the Repository: Clone this repository to your local machine using the following command:

    git clone <repository-url>
  2. 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.

  3. Run the Game: Execute the compiled application to start playing the game:

    dotnet run
  4. 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.

Gameplay

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.

Design Patterns

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.

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

oop-adventure's People

Contributors

meofiscoding avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.