A sophisticated Java implementation of the classic Whack-a-Mole arcade game, demonstrating advanced Object-Oriented Programming principles, multithreading, and GUI development.
- Multiple Game Objects: Interact with Moles (+100 points), Bonus Moles (+1000 points), and avoid Bombs (-500 points)
- Dynamic Gameplay: Objects appear randomly across a 3x3 grid with varying lifespans
- Time Challenge: 30-second countdown adds urgency to the gameplay
- Persistent High Scores: Score tracking across sessions using Java serialization
- Responsive UI: Clean, colorful Swing-based interface with smooth animations
- Concurrent Design: Separate game engine thread ensures lag-free user experience
# Clone the repository
git clone https://github.com/yourusername/whack-a-mole.git
# Navigate to project directory
cd whack-a-mole
# Compile the project
javac -d bin src/**/*.java
# Run the game
java -cp bin game.ui.GameUI
- Start the Game: Run the application to begin
- Click to Whack: Click on objects as they appear from holes
🐹 Mole: Click for +100 points
💎 Bonus Mole: Click quickly for +1000 points (appears for 2 seconds)
💣 Bomb: Avoid! Costs -500 points if clicked
- Beat the Clock: Score as many points as possible before time runs out
- Track Progress: View your score and remaining time at the top of the screen
- Compete: Try to beat the high score displayed on the game-over screen
Active gameplay showing moles, bombs, and bonus moles appearing in the grid
End-game summary displaying final score and high score