Build the MoleMash Game


Molemash is a simple game in which a mole (or a picture of your little brother) jumps randomly around the screen and you try to touch it to get points. Build this game and learn how to add timing and randomness into your apps.

 
screenshot
Scan this QR code to download the app

Add a canvas, image sprite, and clock, then code blocks so that the mole moves to a new random spot each interval.

Looks best in full screen.

Program the MoleSprite.Touched event to add one to the label showing the score

Looks best in full screen.

Change the if clause in the Canvas.Touched into an if-else

Looks best in full screen.

Drag in a label for the bar and define a variable "energy". When the user misses, subtract from energy and change width of label.

Looks best in full screen.

When energy becomes 0 tell the user (text-to-speech) and disable the clock and behaviors

Looks best in full screen.