Enhancements to the Aquarium Program
For this assignment you will enhance the Aquarium program.
- Complete any unfinished exercises from the Lab on
Displaying the Aquarium
Using Graphics and the two
Mini-Labs (Staying In Bounds
and Adding Color and Keep on
- Add support for more fish colors in display.cpp. Test them
by using different initial colors of fish as you construct them and
re-running the program. You may also wish to explore different colors
for the water in the aquarium. You can find color names in
colors.h in the CMU graphics library.
- Look at the CMU graphics demo program to see how to use
Pause rather than WaitNClear. Update your program to
use this function to get a smoother simulation.
Keep a call to WaitNClear at the end of your program so that
the simulation doesn't just disappear.
Don't forget to
#include the appropriate header file to use Pause.
(You will need to search for
Pause in the demo program to
find both the proper #include statement and examples of how
the function is called.)
NOTE: you may wish to comment out the call to WaitNClear, rather than
remove it, in case it comes in handy at a later date.
- Give each fish a 1 in 4 chance of changing direction, rather than a
50/50 chance (unless, of course, the fish is at a wall, in which case it
must change direction).
- Update the documentation and comments in your program (main.cpp
and display.cpp) to conform to the guidelines and standards for
- Save and print your work.