Version 8 --------- There is a world with 1 randomly-placed, randomly-sized, stationary particle. There are buttons to play, step, and reset the model. Stepping the model causes the particle to move. If the particle hits a wall, it bounces off. Resetting the model places the particle at a new random location with a new random size. Playing the model causes it to step repeatedly. Resetting the model causes it to stop playing. Once the play button has been clicked, it can't be clicked again until the model is reset. 1. Add an "if" statement to the step function that checks if the particle has gone past a wall, and if it has, reverses the direction of the particle 2. Anywhere there is code for center_x and velocity_x, add code for center_y and velocity_y Version 7 --------- There is a world with 1 randomly-placed, randomly-sized, stationary particle. There are buttons to play, step, and reset the model. Stepping the model causes the particle to move. Resetting the model places the particle at a new random location with a new random size. Playing the model causes it to step repeatedly. Resetting the model causes it to stop playing. Once the play button has been clicked, it can't be clicked again until the model is reset. 1. In the reset function, call clearInterval 2. In the play function, add a line to disable the play button 3. In the reset function, add a line to enable the play button Version 6 --------- There is a world with 1 randomly-placed, randomly-sized, stationary particle. There are buttons to play, step, and reset the model. Stepping the model causes the particle to move. Resetting the model places the particle at a new random location with a new random size. Playing the model causes it to step repeatedly. 1. Add an HTML button element for the Play button 2. define a JavaScript function that is called whenever the button is clicked 2a. the function will call the step function repeatedly using setInterval Version 5 --------- There is a world with 1 randomly-placed, randomly-sized, stationary particle. There are buttons to step and reset the model. Stepping the model causes the particle to move. Resetting the model places the particle at a new random location with a new random size. 1. Add an HTML button element for the reset button 2. Define a JavaScript function that is called whenever the button is clicked 2a. The function will basically do what the onload function already does 2b. Except we also have to clear the canvas 3. Add an HTML button or the step button 4. Define a JavaScript function that is called whenever the button is clicked 4a. Change the x-position of the center of the particle by 1 Version 4 --------- There is a world with 1 randomly-placed, randomly-sized, stationary particle. 1. Get random numbers for center_x, center_y, and radius 2. Make sure the circle is inside the walls Version 3 --------- There is a world with 1 stationary particle. 1. Make canvas bigger 2. Create a JavaScript file 3. Link it to the HTML file 4. Add JS code to draw a circle on the canvas Version 2 --------- 1. Create an HTML canvas element 2. Style it using CSS (give it a border and a background color) Version 1 --------- 1. Add our name 2. Add a description Version 0 --------- 1. Download the template 2. Upload the template to our public_html 3. Open the template in our web browser