Activity 4 - Change the key assignment to move right paddle.

Activity 4

Now you know how to change key assignments to control a paddle’s movement. Great work!

We have added movement for the left paddle. Can you apply the knowledge about the Paddle object and its attributes that influence its movement on screen to change the key assignment for the right paddle?

Find // TODO (ACTIVITY 4) in the code. Modify the appropriate attribute value for the right paddle such that pressing the 'UP' key moves the right paddle up.

Press run to confirm the result.

Takeaway

You have just modified up_key attribute in Paddle class to influence how the right paddle object should move on screen.