/canvas-fun

Primary LanguageJavaScript

Canvas Fun

The code loads a 600x600 canvas and creates 20x20 squares when clicked. The squares travel at a random speed and direction until they hit a wall. When they hit a wall, they get a new random speed away from the wall.

Please comment if you have any questions about the code