- View the video walkthrough by clicking here
-
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.
- To fork the project, click the
Fork
button located at the top right of the project.
- Navigate to your github profile to find the newly forked repository.
- Copy the URL of the project to the clipboard.
- Clone the repository from your account into the
~/dev
directory.- if you do not have a
~/dev
directory, make one by executing the following command:mkdir ~/dev
- navigate to the
~/dev
directory by executing the following command:cd ~/dev
- clone the project by executing the following command:
git clone https://github.com/MYUSERNAME/NAMEOFPROJECT
- if you do not have a
- Ensure that the tests run upon opening the project.
- You should see
Tests Failed: 99 of 99 tests
- You should see
- from a terminal navigate to the root directory of the cloned project.
- from the root directory of the project, execute the following commands:
- add all changes
git add .
- commit changes to be pushed
git commit -m 'I have added changes'
- push changes to your repository
git push -u origin master
- add all changes
- from the browser, navigate to the forked project from your github account.
- click the
Pull Requests
tab. - select
New Pull Request