Be sure to provide screenshots along with your explanations.
1. Describe the purpose of each enhancement that you added to your app. Give brief descriptions of the enhancements and provide screenshots of important blocks and describe how you used them to solve certain programming problems. Include these descriptions in your write-up, below.
The app has a theme based around littering. The canvas is an image of a city and the sprite is a piece of trash that needs to be "picked up" by tapping it. It is programmed to give the user a single point when they tap the sprite on screen. The sprite moves to a random position on the canvas when the clock ticks. When the player reaches a score of 25, the game ends and they win. If the player misses the sprite three times, the game ends and they lose. There is also a procedure to reset the game that is used when the app initiates and when the reset button is pressed.
2. When the user touches an ImageSprite, both the Canvas.Touched and ImageSprite.Touched events are triggered. This is important for more complex games. For instance, suppose there are "good" and "bad" sprites in your game. If you hit one, you earn a point. If you hit the other, you lose two points. If you hit the Canvas and don't hit the ImageSprite, you lose 1 point. How would you code this?
In order to differentiate between the good and bad sprites you would have two separate pieces of code that dictated what would happen when each of them were pressed. For hitting the canvas and not the image sprite you set the code to say if the canvas and the good sprite is touched then you earn a point but if you hit the canvas and not any sprite then you lose one point.
3. How do you speed up the movement of the ImageSprite? What is the fastest it could move?
You speed up the movement of the image sprite by adjusting how fast the clock component ticks. The fastest it could move was every one millisecond.