bouncing ball code
- cory aberle
- Apr 4, 2019
- 1 min read
first I created the variable fr all of my basic reusable values like x, y, and their speed. the drew a black circle using those variables
made it so every time the code looks for an x or y value it is increased by 10 for x and 15 for y. after that I made if statements to top the ball at each wall using the size of the canvas and the radius of my ball and when the ball reached the wall I reversed the speed to the opposite direction ad changed the color
Comments