|
Java MBS
For those of you who don't know, the Java MBS is the program used for several questions on the Java AP exam. In computer science class, we were told to write our own version of the Java MBS since the one we were provided with didn't work. I am using BlueJ. My darter fish does not move correctly. I have no clue why. Attached are each of my individual classes. They are pretty straight forward. Please examen the move method in DarterFish. The DarterFish can only move East and West. My problem arises when the fish hits the end of the grid it is contained in. It will change direction, but will no longer move forward. It will continue to change Direction until the program is stopped. My program doesn't have any graphics yet, so just draw a 4 x 4 grid on a piece of paper, number each side from 0 to 3, put a fish facing west in the bottom right corner and follow along with the text output.
|