Solution to Recitation 6. Add these features:
- Replace ball0 and ball1 by a single array of objects.
- Add a property dy (1, -1, random(-5, 5), …) to make the balls drift horizontally.
- Each ball should bounce off the left and right edges of the canvas, just as it bounces off the bottom of the canvas. When a leftwards-moving ball hits the left edge of the screen, it should switch velocity and move right.