Catch them before they escape you!
This is my first repository on Github using p5.js sketch. The game will start once you hit the 'Play sketch' button in the editor file on p5.js below. The rule is to use your left/right arrow on your keyboard to move the sliding bar such that it catches the balls when they approach you. There is also a Score Counter on the sliding bar and it increases 10 points each time you can catch a ball.
p5.js editor for this code: https://editor.p5js.org/linokon4120/sketches/5fMk1_OSE
Github Page: https://linokon4120.github.io/CatchTheBalls/
Screenshot of the interactive animation this code generates:
![image](https://private-user-images.githubusercontent.com/152306044/290060101-444922fa-4c21-405b-9ddb-65d6b7041150.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMzkxNzgsIm5iZiI6MTcyMzIzODg3OCwicGF0aCI6Ii8xNTIzMDYwNDQvMjkwMDYwMTAxLTQ0NDkyMmZhLTRjMjEtNDA1Yi05ZGRiLTY1ZDZiNzA0MTE1MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgwOVQyMTI3NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZTdiMDQ3Y2U2M2MwYzA4MDIwN2ZlMWI5MjYxODhiYWI0OGMzMWMwMjQwMDNkMWMzODNhYTc3NDkzYWNiNmJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.AhyDhb3FaTmoQgOOMEGPKxE8WZ24IzsKkQq5YJVfNvk)