Skip to content

syed-ahmad-global/whack-a-mole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whack-A-Mole

HTML5 CSS3 JavaScript License

A classic arcade-style Whack-A-Mole game

FeaturesHow to PlayInstallation

A classic arcade-style Whack-A-Mole game built with vanilla HTML, CSS, and JavaScript. Test your reflexes as moles pop up randomly from holes – click them before they disappear!

Play Online

Try the game live: whack-a-mole-1.netlify.app

Preview

Game Preview

Features

  • Progressive Difficulty System – The game gets faster as your score increases:
    • Easy (0-49 points): Moles stay visible for 1.5 seconds
    • Medium (50-69 points): Moles stay visible for 1.2 seconds
    • Hard (70+ points): Moles stay visible for 1.0 second
  • 60-Second Timer – Race against the clock to maximize your score
  • Custom Cursor – Hammer cursor with click animation for immersive gameplay
  • Sound Effects – Satisfying smash sound when you hit a mole
  • Visual Feedback – Mole changes appearance when whacked
  • Responsive Design – Works on both desktop and mobile devices

How to Play

  1. Watch as moles randomly appear from the 9 holes
  2. Click on a mole before it disappears to score 10 points
  3. The game difficulty increases as your score goes up
  4. Try to get the highest score within 60 seconds

Tech Stack

  • HTML5 – Game structure
  • CSS3 – Styling with Grid layout, custom animations, and media queries
  • JavaScript (ES6+) – Game logic, timer, event handling

Getting Started

  1. Clone the repository:

    git clone https://github.com/syed-ahmad-global/whack-a-mole.git
  2. Navigate to the project directory:

    cd whack-a-mole
  3. Open index.html in your web browser or use a local server:

    # Using Python
    python -m http.server 8000
    
    # Or using Node.js
    npx serve
  4. Play and enjoy!

Game Mechanics

  • Scoring: Each successful whack awards 10 points
  • Mole Behavior: Moles appear at random intervals in random holes
  • Level Progression: Speed increases based on total score
  • Game Over: After 60 seconds, your final score is displayed

License

This project is open source and available for educational purposes.

Credits

Built with vanilla web technologies – no frameworks or libraries required!

Support & Contact


Built with ❤️ using vanilla HTML, CSS, JS

⬆ Back to Top

About

A classic Whack-A-Mole arcade game built with HTML, CSS, and JavaScript. Features progressive difficulty, sound effects, and a 60-second timer.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors