Can you add a score to your game?
You could add code so that the player scores a point for every correct answer. If you’re feeling mean, you could also add code to reset the player’s score to zero if they give a wrong answer!
It’s fun to keep track of a high score in a game.
Let’s say you have a variable called
, which gets set to zero at the beginning of each game.score
Add another variable called high score
.
At the end of the game (or whenever you want to update the high score), you’ll need to check whether you have a new
.high score
Can you make your character react to the player’s answer by changing to a different costume if the answer is correct or incorrect?