Austin J Blake



A point and click game made with Javascript and CSS

This fun small project shows that Javascript can be used for much more than you might think at first.

Using only Javascript and CSS classes, the game is fully playable and even includes a restart button and scoreboard. Animating the moles is done by adding and removing CSS classes when a hole is selected. A little Javascript logic gets us a random location and duration for our mole.

setTimeout gives the power to control the length of the game as well. A few recursive functions make sure we have a random hole that's different than the current one, and keeps the action going until time is up.