Skip to content

Conversation

@Kanavpreet-Singh
Copy link
Contributor

worked on issue #357 under Hacktoberfest 2025

Screen.Recording.2025-10-21.115727.mp4

@vercel
Copy link

vercel bot commented Oct 21, 2025

@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.

@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
learn-javascript Ready Ready Preview Comment Oct 23, 2025 11:04am

Copy link
Contributor

Copilot AI left a 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.
Copy link

Copilot AI Oct 21, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +32
- 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

Copy link

Copilot AI Oct 21, 2025

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.

Suggested change
- 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)

Copilot uses AI. Check for mistakes.
## Bonus Challenge

- Add **levels** (Easy, Medium, Hard) that increase mole speed
- Add a **visible countdown timer**
Copy link

Copilot AI Oct 21, 2025

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.

Suggested change
- Add a **visible countdown timer**
- Add a **pause/resume button** to control the game

Copilot uses AI. Check for mistakes.
@sumn2u
Copy link
Owner

sumn2u commented Oct 21, 2025

Love the game. Is it possible to reset the game, when someone changes the difficulty levels?

Screenshot 2025-10-21 at 6 46 31 PM

@Kanavpreet-Singh
Copy link
Contributor Author

I'll add that

@Kanavpreet-Singh
Copy link
Contributor Author

freecompress-Screen.Recording.2025-10-22.094611.mp4

@sumn2u pls check

Copy link
Owner

@sumn2u sumn2u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sumn2u sumn2u merged commit fbf02e4 into sumn2u:main Oct 23, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants