Below is a picture of an example world, in which
the first object is a frog and the other two objects
are ladybugs.
The other two objects are to move continously around the center object. The code describing the movement for these two objects must be written in a method. The movement can be anything you want as long as they don't "run into" the first object while it is sitting in the center of the world.
You are to create a world where the first object tries to "catch" the other two objects as they move around.
You are to add the following events to your Alice world to have the first object try to catch the other two objects.
To determine if an object has been caught, create an event that will detect when the first object is within 1 meter of one of the other two objects. When this happens have the "caught" object move down below the ground so it "disappears". Also when the first object is back in the center, have it say: "I caught X", where X is the total number of objects caught. Note that you will most likely need to create two events to do this. One event for each object to be caught.
The last event will be have the center object say something like "I caught them all" when all of the objects have been caught. The use of a variable is most likely needed to do this. You can use the math function of the world object to check if
world.count == 2is true. Where world.count is a variable you created as part of the world object.
The final must be submitted electronically to the Assignment Link for Final inside of Blackboard.
If your net-id is: mjones1
Then the filename is to be: mjones1final.a2w
CS 100 - Discovering Computer Science
Department of Computer Science
University of Illinois at Chicago