Question: I need help writing the code for this, It should be written in Processing 3 in Python For this question, you will write a program

I need help writing the code for this, It should be written in Processing 3 in Python

I need help writing the code for this, It should be written

For this question, you will write a program where the user can move a Pok Ball left and right, and the Pok Ball must also rotate accordingly. Your program should behave as follows: When the program starts: Display a blank, grey canvas with a Pok Ball drawn in the middle of the canvas. When the user presses the 'D' key: The Pok Ball should move to the right while rotating clockwise. When the user presses the 'A' key: The Pok Ball should move to the left while rotating counter-clockwise. When the user releases all keys: The Pok Ball should stop moving and rotating. You will need to use variables in this program to keep track of the horizontal ( x ) position of the Pok Ball. as well as the angle indicating how much it has been rotated. Figure 1: Canvas after the Pok Ball has been drawn. You should follow the model-view-controller design pattern. The Pok Ball should be drawn inside of its own function (draw_pokeball ()) which takes two parameters: the x-coordinate, and the angle of rotation. These values should change depending upon the user pressing the left or right arrow keys. The movement speed and rotation speed can be any speed you like, as long as it is evident that the ball moves and rotates correctly. Hint: Drawing much of the Pok Ball and handling its rotation can be done by passing the correct arguments into Processing's arc () function

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!