1.1-Introductie-Programmeren

Horse racing

Difficulty: Filled Filled Filled

Create a program that simulates a horse race. In this example, there is only one horse and it needs to travel a predefined distance of 25 steps (of 50 pixels each) on the field.

The program should work with rounds, meaning that the image is updated after each round to show the position of the horse. Each round, the horse can travel a random amount of 1 to 4 steps. After the race is over, a finish flag should be displayed.

You can use the SaxionApp method pause() to wait for user input before moving to the next round.

Example

Example (Note this is a gif that helps you understand how the program is built!)

Example