This activity was created by Tom Simpson at Heathwood Hall Episcopal School.
The SquirrelBot must stay alert for hungry birds of prey. When he senses the dark shadow
of a hawk above him, he needs to take random evasive action to confuse the hungry bird. Program four different escape maneuvers to allow your SquirrelBot to survive another day.
The requirements for this project are as follows:
- The Finch must detect when a shadow falls on either of the light sensors.
- When there is no shadow, the Finch should be still.
- When a shadow is detected, the Finch must make an escape maneuver.
- The Finch should have at least four possible escape maneuvers.
- Each time the Finch detects a shadow, it should randomly choose one of the possible escape maneuvers.
Hint: Make a variable called escapePlan. Each time the Finch detects a shadow, set this variable equal to a random number between one and the number of escape maneuvers. You can use the pick random block on the Operators menu to get a random number.