- Coding Tutorial: https://youtu.be/ej8SatOj3V4
In this tutorial, you will learn to create the whac a mole game with java using the built-in swing awt graphics library.
While creating this mario themed whac-a-mole game, you will learn how to create a graphical user interface (GUI) using java's swing library, add click handlers to whack the mole, and randomly spawn the mole and piranha plant using the Timer and Random modules.
How to setup Java with Visual Studio Code
You can continue working on this project if you like. One feature you can add is a reset button so that you can restart the game without having to rerun the program. As a follow up task, you can also add a variable to keep track of a high score. If you want a challenge, you can also add multiple piranha plants. You should store these piranha plants in an array.