Layout Project

Purpose

Examples

Exercises

  1. Look at the starter code. What’s wrong with putting the paddle at (0,0)? Where would be a better position for the left paddle in Pong?

  2. Our paddle is 20 pixels wide and 100 pixels tall. Would these be good dimensions for a Pong paddle? Why or why not?

  3. Improve the starter code by:

    • Moving the paddle to a better position
    • Adjusting the size if needed
    • Adding a clear comment that explains what each number does
  4. CHALLENGE: The right paddle in Pong is a mirror of the left paddle. How would you change the starter code to draw the right paddle instead? (Hint: the game screen is 400 pixels wide)