image Computational Thinking - Score and counting objects

Suppose we are interested in writing a game in which the rabbit collects carrots on the field. When all carrots are collected, the game ends. How would you describe this game? Below are some examples:
There is a rabbit and 20 carrots.
The player controls the rabbit with the mouse.
When the rabbit touches a carrot, the carrot disappears.
When all carrots are gone, the game ends.
In this game, rabbit collect carrots until all the carrots have been collected.
There is a rabbit and 20 carrots.
The player controls the rabbit with the mouse.
When the rabbit touches a carrot, the carrot disappears and score adds 1 point.
When score is 20, the game ends.
This game plan describes the same game, except instead of saying, "When all the carrots are gone, ..." it uses score to keep track of the carrots. Do you see that the two game plans describe the same behavior? If so, you are applying computational thinking!
There is a rabbit, 20 carrots, and 20 emeralds.
The player controls the rabbit with the mouse.
When the rabbit touches a carrot, the carrot disappears and score adds 1 point.
When the rabbit touches an emerald, the emerald disappears and score adds 1 point.
When score is 40, the game ends.
This game includes emeralds with the carrots and ends when the rabbit has collected all the carrots and emeralds. Again, it uses score to keep track of the game.


Try it yourself: How would you modify the game plan such that emeralds are worth 2 points each and carrots worth 1 point? Are there benefits of giving different scores to different types of objects?


Complete Sample Games for Score and Counting objects

// Game #1. Doodle Sheep Jump.


// Game #2. Get the Bones.


// Game #3. Touch the Red Garnets.



Next Page

Tutorials Home