1 of 9

Computer Science

4.3 Maze Game -Day 3

Collect Items

2 of 9

PseudoCode

If Banana is touching Ball?

Reset ……

Score:

3 of 9

PseudoCode

If Banana is touching Ball?

Reset ……

Hide Sprite

Show Sprite

Score: Add to Score

Reset Score

4 of 9

  • Hide/Show Sprite

Tip: Make it work with one sprite

then duplicate sprite, so code will also duplicate!

When Green Flag ( Reset )

………...show

If touching Ball...

………..hide

5 of 9

B. Create Score variable

Variables: A place to store information.

to keep track of the number of bananas collected.

6 of 9

Create variable.

7 of 9

Variables:

Data Commands

Variables:

a place to store

Information.

Create a “Variable” to hold the Score.

8 of 9

Count stuff. ( using the variable).

If banana is touching the ball sprite

Reset

9 of 9

4.4 Extra Time?

User needs to collect all bananas to finish level: ….Hint: use operators!