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):
- Have it bounce off the top and bottom
- If it goes off the screen left or right, have it reappear in
the center with new xSpeed, ySpeed
- 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)
- Add a sound effect (playSound("somefile.wav") or
playMP3("somefile.mp3") when it bounces and add a sound effect
when it goes off screen
- Have it be a random color each time it restarts (use
findRandomColor() )
- 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.
|