A turn-based Pokémon-style battle simulator written in Java using Swing for the GUI. Players can choose a Pokémon and battle against a computer-controlled opponent using a variety of attack types, each with different damage and accuracy values.
- Introduction
- Installation
- How to Run
- Usage
- Features
- Dependencies
- Configuration
- Troubleshooting
- License
BattleSimulator is a GUI-based game that allows users to select a Pokémon and use different attack types to defeat a randomly chosen opponent. The game includes three Pokémon types: Rat, Snake, and Turtle, each with unique stats.
- Make sure you have Java Development Kit (JDK) installed (version 8 or above recommended).
- Clone or download this repository.
- Place the
BattleSimulator.javafile into your Java project folder.
- Open the file in an IDE like IntelliJ, Eclipse, or compile via terminal: javac BattleSimulator.java
- Then run the compiled class: java BattleSimulator
- When the application starts, choose your Pokémon by clicking one of the three buttons: Rat, Snake, or Turtle.
- After selecting your Pokémon, click Confirm to lock in your choice.
- The computer will automatically select its Pokémon.
- Use the attack buttons:
- Strong Attack
- Medium Attack
- Weak Attack
- Effect Attack
Each attack has different accuracy and damage. After each turn, the computer will respond with an attack of its own.
- The health of both the player and the computer is shown at the bottom.
- The battle continues until one side's HP drops to 0.
- A win or loss message will be displayed, and the game will close after 5 seconds.
- GUI-based Pokémon battle simulation
- 3 Pokémon with unique stats
- Turn-based combat system
- Randomized AI opponent and move selection
- Health and accuracy tracking
- Win/loss detection and display
- Java AWT and Swing libraries (bundled with standard JDK)
No external configuration needed. All Pokémon stats and game logic are hardcoded into the BattleSimulator.java file.
- GUI doesn't open: Ensure you're running the compiled class properly and using a Java version that supports Swing.
- Buttons not responding: Make sure you click Confirm after selecting a Pokémon to enable attacks.
- Game closes immediately: Likely due to either side reaching 0 HP; watch the health labels for progress.
This project is for educational use only. No license specified.