Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using C/C++ language and OpenGL, design a program to do the followings: 1. Create a window with a pathway, similar to the figure above. 2.
Using C/C++ language and OpenGL, design a program to do the followings: 1. Create a window with a pathway, similar to the figure above. 2. Let the user place a green prey at a location specified by a mouse click. The prey starts moving immediately in the pathway at a given speed in an infinite loop. 3. At any time, the user can create a red predator at a location specified by a mouse click as well. 4. Once a predator is created, it starts following the prey at a higher speed ( 2 times the speed of the prey). 5. When a predator is present, the prey is aware of it and will take the Escape to flee, if it gets there first. If the prey escapes, the predator gets a bit smalled in size and stops moving. Note that the predator cannot take the Escape route 6. Should the predator reach the prey, it will eat it, that is, the prey vanishes and the predator gets a bit bigger in size and stops moving
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started