-
Purpose
- To establish familiarity with conditional statements
-
Objective
- Modify the
Greep
class to collectTomato
objects and return them to theSpaceship
while avoidingWater
and obstacles.
- Modify the
-
Description
- Your task is to program the
Greep
to collect as manyTomato
as possible. - You may ONLY CHANGE THE GREEP class.
- You may not change any other class.
- Your task is to program the
-
Getting oriented
- Please view the javadocs for this project to get better acquainted with the object orientation
- the Creature class is the abstract superclass of the
Greep
class. - the Greep is a concrete subclass of the
Creature
class. - the GreepSpit is a composite child of
Greep
. It is the permissible only communication mechanism byGreep
s. - the TomatoPile is where
Greep
gather resources. AGreep
cannot retrieve from aTomatoPile
unless anotherGreep
is there to load it onto the otherGreep
present at the sameTomatoPile
.
- the Creature class is the abstract superclass of the
- Please view the javadocs for this project to get better acquainted with the object orientation
-
Development Constraints
- Only change the class
Greep
. No other classes may be modified or created. - No additional fields. You cannot extend the
Greep
memory.- you are not allowed to add fields to the class (except final fields).
- You can use the one byte memory that is provided.
- You cannot
move
more than once peract
round. - You cannot communicate directly with other
Greep
.- That is: no field accesses or method calls to other
Greep
objects are allowed. Greep
can communicate indirectly via theGreepSpit
on the ground.
- That is: no field accesses or method calls to other
- No long vision.
- You are allowed to look at the world only at the immediate location of the Greep.
Greep
are almost blind, and cannot look any further.
- No instantiating
Actor
subclasses.Actor
subclasses, such asGreep
orGreepSpit
, cannot be instantiated.Greep
have no magic powers - they cannot create things out of nothing.
- No teleporting.
- Methods from
Actor
that cheat normal movement (such assetLocation
) may not be used.
- Methods from
- Only change the class
- This application is built using the Jfoot library.