Rotate your device.
Turn off orientation lock in device settings.

Tap or click to reset
Immersive Reader

Here's our game from an earlier stage but most of the code is hidden. We've added a new function called score_points.


Edit the function so that a new parameter called points is added to player_score.

The variable player_score should increase each time Dog tags Cat with pie, and decrease each time that Cat tags Dog with a sandwich.


Note: When you're done, click "Run" to play. When Dog scores 6 points, you will move on to the next puzzle.

Blocks
Workspace
Actions
Math
Functions
Variables
Actions
Math
Functions
Variables
0setplayer_scoretowhen runplaylose pointsoundscore_pointsEditwhen actor1touchesanythingplaywin point 2soundscore_pointsEditwhen actor2touchesanything