Welcome to Computer Programming

 

HWJ11 PongBall - 4 points

Subday - HELP EACH OTHER OUT - I CANT BE THERE TO ASSIST, SO GET HELP FROM EACH OTHER - I EXPECT BALL DONE BY TOMORROW

Add these things (probably in this order):

  1.  Have it bounce off the top and bottom
  2. If it goes off the screen left or right, have it reappear in the center with new xSpeed, ySpeed
  3.  Have xSpeed, ySpeed never be between -5 and 5 (or whatever your determine is best).  [this is the while statement]

Advanced (most of you do at least 1)

  1.  Add a sound effect (playSound("somefile.wav") or playMP3("somefile.mp3") when it bounces and add a sound effect when it goes off screen
  2.  Have it be a random color each time it restarts (use findRandomColor() )
  3. Have it speed up over time (you might have to have it bounce off the left and right wall temporarily instead of resetting).

If you finish early - advanced people try to add paddles.