COMP 1671 , Fall 2008

Assignment 3

Due October 28

Programming Assignment Three: Greeps Competition

You will use Greenfoot to compete against the students in the other course sections. The competition is who can program their Greeps to collect the most tomatoes and take them back to the Spaceship. To participate, you will need to download Greeps.zip which contains the Greenfoot scenario. Here are the rules:

Rule 1: Only change the class 'Greep'. No other classes may be modified or reated.

Rule 2: No additional members.. You cannot extend the Greeps' memory. That is: You are not allowed to add members to the cclass (except final members). ). You can use the one byt memory that is provided.

Rule 3: You cannot move more than once per 'act' round.

Rule 4: You cannot communicate directly with other Greeps. That is: no field accesses or method calls to other Greep objects are allowed. (Greeps can communicate indirectly via the paint spots on the ground.)

Rule 5: No long vision. You are allowed to look at the world only at the immediate location of the Greep. Greeps are almost blind, and cannot look any further.

Rule 6: No creation of objects. You are not allowed to create any scenario objects (instances of user defined cclasses such aas Greep or Paint). Greeps have no magic powers - they cannot create things out of nothing.

Rule 7: No tele-porting. Methods from Actor that cheat normal movement (such as setLocation) may not be used. The competition will consist of a number of rounds. During each round your Greeps will land their Spaceship at 10 different locations. Your score for that round will be the total number of tomatoes collected for those 10 locations. Note that the Greeps.zip file only ccontains the first 3 3 landing locations The remaining 7 are a surprise! Your total competition score will be the sum of the scores from each round. There will be at least two rounds. More may be added at the discretion of the Judges.

Rule-Breakers will be removed from the competition. All decisions of the Judges are final. This competition first occurred at the ACM SSIGCSE conference in 2007. That competition description can be downloaded by following the the Competition Flyer link on the course page. The Flyer contains additional useful information.