Skip to content

Preveen369/WhacAMole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🎮 WhacAMole – A Classic Whac-a-Mole Game

Platform Tech Language License

WhacAMole is a desktop application built using Java and Swing, implementing the classic Whack-a-Mole game. Players can test their reflexes by clicking on moles as they pop up on the screen. The game features a simple graphical interface with mole images, a score tracker, and a timer, providing an engaging and fun experience.


🚀 Features

🏠 Main Game Window

  • Displays the game board with mole holes.
  • Includes a start button to begin the game.

🐀 Mole Pop-Up Mechanism

  • Moles randomly appear and disappear in the holes.
  • Players click on moles to score points.

📊 Score and Timer

  • Tracks the player's score based on successful hits.
  • Features a timer to limit the game duration.

🖼️ Visual Assets

  • Uses images for moles and the game background.
  • Provides a visually appealing interface with Swing components.

🛠️ Tech Stack

  • Frontend: Java Swing
  • Language: Java

📂 Project Structure

WhacAMole/

    ├── src/               # Source folder containing Java files
    │   ├── App.java       # Main application entry point
    │   └── WhacAMole.java # Core game logic and Swing UI
    ├── monty.png          # Image for the mole
    ├── piranha.png        # Alternate image for the mole
    └── .gitignore         # Git ignore file

🧪 Installation & Setup

📋 Prerequisites

  • Java Development Kit (JDK) 8 or higher
  • A Java IDE (e.g., IntelliJ IDEA, Eclipse) or command-line tools

🧑‍💻 Steps to run

  1. Clone the repository

    git clone https://github.com/Preveen369/WhacAMole.git
    cd WhacAMole
  2. Compile and run the app

    • Navigate to the src directory:
      cd src
    • Compile the Java files:
      javac App.java WhacAMole.java
    • Run the application:
      java App

Alternatively, import the project into your IDE and run App.java.


🤝 Contributing

Pull requests are welcome! Feel free to fork the repository and suggest improvements.

Steps to contribute:

# 1. Fork the repository
# 2. Create a feature branch
git checkout -b feature-name

# 3. Commit your changes
git commit -m "Add feature description"

# 4. Push to GitHub
git push origin feature-name

# 5. Open a Pull Request

📧 Contact

For queries or suggestions:


🌟 Show Your Support

If you like this project, please consider giving it a ⭐ on GitHub!

About

WhacAMole is a Java Swing desktop game where players test their reflexes by clicking moles as they appear. It features a simple UI, score tracker, and timer for a fun, interactive experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages