INQ241B
Mobile Apps

Activity 4

Extend the Chase App

  1. Add the ability to lose the game. When the Timer runs out, is less than 1, draw the text "Game Over" on the canvas. Also hide the sprites when the game is over. You can hide sprites by changing the visiblity property, just like other components.

  2. Add the ability to reset the game. When the game is over and the user touches the canvas, the game should restart. To resart the game, set the time back to its original value and make the sprites visible again. It should not be possible to reset the game while playing.

  3. Add an enemy sprite to the game. It should be always moving slowly towards the player sprite. If it collides with player sprite, it should move to a random location and remove time.