Its a console based RPG battle simulator developed in java focusing OOP fundementals like classes,loops and methods.
This repository contains a console-based battle simulation engine developed in Java. The project focuses on implementing fundamental Object-Oriented Programming (OOP) principles and structured control flow.
The application simulates a turn-based combat system between two predefined heroes. It manages character states, calculates interactions, and handles game logic through a command-line interface.
- Encapsulation & State Management: Utilized a standalone
Heroclass to manage character attributes such as health points (HP), damage values, and class roles. - Control Flow Logic: Integrated a
whileloop to maintain the simulation state, complemented byswitch-casestructures for user input processing. - Data Integrity: Implemented conditional checks within methods to ensure health values remain within logical bounds (clamping at zero upon character defeat).
- Constructor Utilization: Employed parameterized constructors and the
thiskeyword for precise object initialization.
- Compile the source files:
Hero.javaandNewClass.java. - Execute the main class.
- Use the numeric console inputs to trigger attacks or retrieve character status reports.