Question: In C language Escape Using C/ language and OpenGL, design a program to do the followings: 1. Create a window with a pathway, similar to

 In C language Escape Using C/ language and OpenGL, design a

In C language

Escape Using C/ language and OpenGL, design a program to do the followings: 1. Create a window with a pathway, similar to the above figure. 2. Let the user place a green prey at a location specified by a mouse click. The prey starts moving immmediately 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 scape route 6. Should the predator reache the prey, it will eat it, that is, the prey vanishes and the predator gets a bit bigger in size and stops moving. Escape Using C/ language and OpenGL, design a program to do the followings: 1. Create a window with a pathway, similar to the above figure. 2. Let the user place a green prey at a location specified by a mouse click. The prey starts moving immmediately 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 scape route 6. Should the predator reache 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

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!