Assignment 7
- ncampanelli0
- Oct 28, 2019
- 1 min read
The program generates a circle, randomly places it on the screen and animates it moving. It bounces off all the walls precisely based on the pixels. The entire program is editable due to making use of variables. When bouncing off a wall the color changes to a random color (all colors that the screen can show are in the list). This was achieved by randomizing 3 numbers between 0 to 255 and then converting the float (or double?) to an integer with the round function and using the output as the input for a fill function. Each segment of the code is commented to explain the purpose of it.
Comments