Project 550: Racing Road

12. (Optional) Count miles

The game should keep track of how good the player is doing based off how many miles they drove before getting knocked off the screen. The miles should be based off the speed variable.
Starting point file for this challenge

Your goal

Steps

1. Create a "miles" variable

Go to the "variables" blocks and click "Make a variable." Call this one "miles." 

2. Set miles to 0 at the start of the game

In your car's code, grab another "when green flag clicked" block and put it anywhere. Add a "variables" block called "set __ to __" and set miles to 0. 

3. Raise miles by speed forever

Use a forever loop, and the "change __ by ___" variables block. There are many ways to do this, so try experimenting on your own.