I am learning programming on Greenfoot. I'm creating a scenario that has 5 balls which will follow these properties:
The balls must bounce off the edges of the world in such a way that the angle of incidence equals the angle of reflection.
Each ball must move at a random speed in each of the X- and Y-directions, which speed may vary between 0 and 5 pixels per direction when the instance is created but stays constant for the lifetime of the ball.
Any tips on how to get started would be greatly appreciated, thanks!