Question: Could use help getting started on this problem. Write a C++ program and algorithm for a class inheritance game where a small fish with random

Could use help getting started on this problem.

Write a C++ program and algorithm for a class inheritance game where a small fish with random position and direction is eaten by a larger fish initial position center to board and direction speed a little higher than the small fish. The class member functions include a draw function where the big fish stays at the middle. The direction is measured by the input function when say press 4 means LEFT, 6 means RIGHT, 8 means UP, 2 means DOWN and s means STOP. Use a score function as the big fish eats (both coordinates same) the small fish. Also put the small fish into random position each time Big Fish eats the small fish. Change the coordinates of fish if they touch the wall.

Note: Use #include for console I/O and functions kbhit() which returns true if key board is pressed and getch() which returns ASCII value of the key pressed.

Thanks,

CW

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!