-
Notifications
You must be signed in to change notification settings - Fork 185
added Whack a Mole Game #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@Kanavpreet-Singh is attempting to deploy a commit to the Suman Kunwar's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new Whack-a-Mole game to the beginner projects collection, implementing a playable reflex game where users click on randomly appearing moles within a time limit.
Key Changes
- Implemented a complete Whack-a-Mole game with HTML, CSS, and JavaScript including four difficulty levels (Beginner, Easy, Medium, Hard)
- Added comprehensive documentation for the game in both the example folder and beginner projects section
- Created responsive UI with smooth CSS animations and gradient backgrounds
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/Whack-A-Mole/index.html | Game structure with 9 holes, difficulty selector, score display, and timer |
| examples/Whack-A-Mole/styles.css | Styling for game board, mole animations, and responsive layout |
| examples/Whack-A-Mole/index.mjs | Core game logic handling mole spawning, hit detection, difficulty levels, and timer management |
| examples/Whack-A-Mole/README.md | Project documentation with features, file descriptions, and gameplay instructions |
| en/beginner-projects/whack-a-mole.md | Beginner project guide with concept explanations and bonus challenges |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| ## Features | ||
|
|
||
| - 🎯 **Fast-paced gameplay** — moles appear randomly across the board. | ||
| - ⏱️ **30-second timer** — challenge yourself to score as high as possible within the time limit. |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation states a fixed 30-second timer, but the implementation supports configurable durations per difficulty level (all currently set to 30 seconds in LEVELS object). Consider updating this to reflect that the duration is configurable or difficulty-dependent.
| - Add **levels** (Easy, Medium, Hard) that increase mole speed | ||
| - Add a **visible countdown timer** | ||
| - Store and display **high scores** using `localStorage` | ||
| - Add **sound effects** when the mole is clicked | ||
| - Use **images or emojis** to customize the mole design | ||
|
|
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bonus challenge suggests adding difficulty levels, but the implementation already includes four difficulty levels (Beginner, Easy, Medium, Hard). This should be updated to reflect that difficulty levels are already implemented and suggest alternative enhancements.
| - Add **levels** (Easy, Medium, Hard) that increase mole speed | |
| - Add a **visible countdown timer** | |
| - Store and display **high scores** using `localStorage` | |
| - Add **sound effects** when the mole is clicked | |
| - Use **images or emojis** to customize the mole design | |
| - Add **power-ups** (e.g., double points, freeze mole, extra time) | |
| - Add a **visible countdown timer** | |
| - Store and display **high scores** using `localStorage` | |
| - Add **sound effects** when the mole is clicked | |
| - Use **images or emojis** to customize the mole design | |
| - Add a **leaderboard** to show top scores | |
| - Implement a **multiplayer mode** (local or online) | |
| - Add **custom themes** or color schemes | |
| - Improve **accessibility** (keyboard controls, screen reader support) |
| ## Bonus Challenge | ||
|
|
||
| - Add **levels** (Easy, Medium, Hard) that increase mole speed | ||
| - Add a **visible countdown timer** |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bonus challenge suggests adding a visible countdown timer, but the implementation already includes a countdown timer displayed in the UI (<span id=\"time-left\">). This should be updated to reflect that a timer is already implemented and suggest alternative enhancements.
| - Add a **visible countdown timer** | |
| - Add a **pause/resume button** to control the game |
|
I'll add that |
freecompress-Screen.Recording.2025-10-22.094611.mp4@sumn2u pls check |
sumn2u
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM

worked on issue #357 under Hacktoberfest 2025
Screen.Recording.2025-10-21.115727.mp4