A minimalist, text-based RPG battle simulator written in Python. This project demonstrates basic Object-Oriented Programming (OOP) principles by simulating a turn-based combat between a player-controlled hero and a randomly generated enemy.
This is a simple command-line game where a hero fights against various monsters. The hero gains experience from victories, levels up, and becomes stronger. The difficulty of the enemies scales with the hero's level, providing a consistent challenge. The project is designed to be simple, clean, and easily extendable.
- Object-Oriented Design: Uses a
Characterclass for both the hero and enemies. - Turn-Based Combat: A classic battle loop where the hero and enemy take turns attacking.
- Leveling System: The hero gains experience, levels up, and improves their stats (health and attack).
- Dynamic Enemies: Enemies are randomly selected and their stats scale based on the player's level.
- Simple & Extendable: The code is straightforward and easy to modify or expand upon.
To get a local copy up and running, follow these simple steps.
You need to have Python 3 installed on your system.
-
Clone the repository:
git clone https://github.com/your-username/your-repository-name.git
(Replace
your-username/your-repository-namewith your actual GitHub username and repository name) -
Navigate to the project directory:
cd your-repository-name -
Run the script:
python game.py
(Assuming you named your file
game.py)