The Greeps are small, bug-like aliens obsessed with tomatoes. They have come to Earth, the largest source of tomatoes in the galaxy, in order to sate their hunger for tomatoes. You will be in control of 20 Greeps (no more, no less) and are challenged with providing the Greeps with the best algorithm to find as many tomatoes as possible!
It's not as simple as it sounds, however. Greeps have some of the best memories in the galaxy, but can only remember a few things at a time. Also, they are so small that they cannot pick up a tomato to carry themselves. They can, however, load a tomato on the back of another Greep. They also cannot communicate with each other, other than spitting and seeing paint spots.
The competition will run from 10-31-14 to 11-6-14. Teams may be formed, but no more than two people may work in a team. Teams will need to be submitted by the beginning of the competition.
Only change the class Greep
. No other classes may be modified or created.
Greep.java
file provided, so don't try!final
fields and follow all the same rules.You cannot extend the Greeps' memory. No non-final
fields may be added. You are provided with one int
and two boolean
s to use
GRAVITY
or Integer.MAX_VALUE
.Creature
to allow direct access to the integer memory.The boolean
flags may be set with this.setFlag(int, boolean)
int
is the number of the flag, 1 or 2boolean
is the value to setthis.getFlag(int)
World
in any way is illegalYou cannot move more than once per act
round
move()
can only be called once per act()
Greeps cannot communicate with each other directly. They cannot call each other's methods or access each other's fields
No creation of objects. World.addObject()
is not allowed at any time
Paint
spots ONLY WITH Creature
's spit()
method IS allowed.No teleporting.
Actor.setLocation()
are illegalActor.move(int)
is illegal. Creature.move()
is legal.No changing the size of the Greeps
Creature
(see Greenfoot book). Many essential methods to be used by the Greeps are defined here.Start here:
Num Of Tomatoes | Grade |
---|---|
50+ | 100 |
40-49 | 90 |
30-39 | 80 |
20-29 | 70 |
10-19 | 60 |
0-9 | 0 |
Student | Score |
---|---|
Mr. Davis | 200 |
Charles + Parker | 170 |
Justin | 168 |
Christy + Shannon | 164 |
Gavin + Jessica | 153 |
Seth + Nathan | 141 |
Swag King Kanye | 128 |
Joannabeth | 123 |
Brett + Brad | 123 |
Vanessa | 110 |
Wyatt | 62 |
Student | Score |
---|---|
Joseph | 270 |
Kaelan + Suyoung | 206 |
Mr. Davis | 200 |
Wesley | 183 |
Daniel | 175 |
Alex | 155 |
Alec | 153 |
Sahaj | 136 |
Josh + Lawrence | 136 |
Oronde + Dylan | 133 |
Jose | 50 |