One of my favorite things to do with these neat little games is to build something that plays them for me by just pasting stuff into the browser JS console. https://pastebin.com/aTYuaNVS At a score of 1,619 the ball is moving so fast it no longer works! I switched to a new tab (hoping that the event loop would be sent to the background/context switch/whatever) and ta-da - it misclicked. High score of 1,637.
function intersectRect(rectA, rectB) { return !( rectB.left >= rectA.right || rectB.right = rectA.bottom || rectB.bottom const arc = document.getElementById("arc"); const ball = document.getElementById("ball");
setInterval(() => { if (intersectRect(arc.getBoundingClientRect(), ball.getBoundingClientRect())) { window.dispatchEvent(new KeyboardEvent('keypress', { keyCode: 32, })); } }, 10);
My code seems to go on forever, closed the tab after it reached 60K