Saint Louis University |
Computer Science 146
|
Dept. of Math & Computer Science |
Topic: Moving Forward
Due:
11:59pm Tuesday, 9 April 2013
Related Reading: none
Please make sure you adhere to the policies on academic integrity.
For this assignment, we return back to the original version of the code for partII, available here, or on turing at /Public/goldwasser/146/partII
The goal is to modify the fish class to provide the following change in semantics to the Move method: a fish should have a directional orientation based on its most recent move, and it should be twice as likely to move forward than it is to move to either side, and it should only move backward when no other move is possible.
To implement this new behavior, you will need to maintain additional state to represent the current orientation of a fish (which defines what is considered "forward").
Your assignment should be submitted electronically (details on the submission process).
For this assignments, you should only be modifying (and thus submitting) files fish.h and fish.cpp. Please also submit a "readme" text file that describes the changes you have made.