Color Bounce

I made the ball change color every time it hits the window. I only drew the background once, so the ball leaves colored trails behind. Since the colors are randomly generated, the result is different each time the script is run.

Here’s the code.

Try it yourself | Github

Leave a Reply