Skip to content

xtheredviper/hero-adventure-classes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

⚔️ Hero Adventure: OOP Classes

JavaScript OOP RPG

📋 About the Project

This project is an immersion into the fundamentals of Object-Oriented Programming (OOP). Featuring an RPG theme (inspired by classics like Baldur's Gate), the code manages different hero classes, each with unique properties and combat methods.

The primary goal was to move beyond linear programming to create a system where data and behaviors (methods) are encapsulated within Classes.

🛠️ Technologies

  • JavaScript (ES6+): Implementation of modern Classes and iteration methods.
  • Node.js: Script execution environment.

🧠 Advanced Concepts Applied

In this challenge, I demonstrated proficiency in:

  • Classes and Constructors: Creating blueprints for complex objects using the constructor method.
  • Class Methods: Implementing the attack() method to encapsulate hero behaviors.
  • Array Iteration (forEach): Handling arrays of objects (heroDescription) to automatically instantiate and execute methods.
  • Dynamic Instantiation: Utilizing the new operator to create unique objects from a base class.

🎮 Implemented Characters

The system dynamically processes heroes such as:

  • Laurel: Elf Paladin.
  • Astarion: Vampire Spawn Rogue.
  • Gale: Human Wizard.

🚀 How to Run

  1. Clone this repository:
    git clone [https://github.com/xtheredviper/hero-adventure-classes.git](https://github.com/xtheredviper/hero-adventure-classes.git)

About

An RPG combat simulator exploring Object-Oriented Programming (OOP) in JavaScript, featuring dynamic hero classes and attack methods.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors