Review Event concept and Conditional statements
Event blocks in Scratch
Conditional blocks in Scratch
An event is an action that causes something to happen.
We need to start a program with an event block.
If the program needs to check the condition many times during its execution, we need to combine forever block with conditional blocks.
Treasure
A treasure appears at a random position on the stage.
It will change the position after one or two seconds.
Hero
The hero is controlled by the player.
The player will use the arrow key to move the hero and try to get the treasure.
If the player gets the treasure, the game will play a sound to congratulate the players.