I'm trying to figure out how to have multiple balls bouncing in a frame simultaneously. I know how to have one ball bouncing but I can't figure out the logic to having more than one ball. I know my code is kind of mess. I appreciate any help. Thanks
posted 1 year ago
You need to add methods in Ball to alter the Ball's x and y.
Also, your moveBall() method doesn't do anything - it calculates new values for x and y, then discards the result.