Today's classwork goes along with Chapter 6, Tips and Techniques. You will be using random values and variables.
Create one world with three animals, one animal that can change colors noticeably. (For example, if you change the color of the chicken, it is noticeable. If you try to change the color of the bunny, you don't see the change.) You might want to consider using cat, chicken and bunny. You may use this or substitute other animals or creatures (just make sure that one of them can change colors by trying it out).
You should write four event handlers. Some may need random values. For some you may need to create a class variable or a variable in a method.
If you have a random value, you should assign it to a variable and print it out so you can see its value when you use it!
(BIG Hint: You need a class variable to save the random value because your event handler is called more than once and both calls need the same value. Also note that you need an if statement in your event handler to determine if you need to have the bunny go up or go down.
Here is what the class variable is being used for. If your class variable is zero then the bunny is on the ground, and you need to set the variable to a random number and have the bunny move up that amount. If the class variable is not zero, then the bunny should move down and you should reset the class variable back to zero to indicate the bunny is on the ground. )
NOTE: There is a bug in Alice. If you create a random integer, Alice does not properly compare its value in an if statement to another integer. Alice treats it as a real number, so it always returns false. You will need to use random real numbers here with ranges, not integers!
If you finish early, feel free to embelish your animations.