That’s it - day 30 and I’ve finished! The final challenge was to build a whack-a-mole game. It seems complex but breaking it down into a handful of small functions really helps.
Event.isTrustedis true if an event was generated by a user action and false when it was created by a script. This is useful here because it would prevent a user from cheating!
The code for the game is on github and the live version is here.