Inspiration Inspired by playing the classic "Whack a Mole" game, we wanted to bring the fun and excitement of the arcade to a webpage.

What it does The game features a mole that randomly appears in a table grid. Players must press the corresponding numpad key to "whack" the mole before it disappears. The challenge is in timing and quick reaction!

How we built it I built it using JavaScript, HTML, and CSS. The mole’s position is dynamically managed within a table, and players interact with it by clicking the numpad keys.

Challenges we ran into I challenges with making the mole move smoothly, setting up the numpad click functionality, and implementing the mole's random appearance through JavaScript's shuffle function.

Accomplishments that we're proud of It’s my first game, and I’m proud to have figured out how to use JavaScript’s shuffle function to randomize the mole's appearance!

What we learned I learned a lot about how to move elements in the DOM, handle user input with numpad keys, and create interactive game mechanics. I also got hands-on experience with JavaScript functions.

What’s next for Whack a Mole I plan to add new levels, improve the mole's movement patterns, and perhaps add some sound effects or animations to make the game even more engaging!

Built With

Share this project:

Updates