you’ve got to control the position of the ‘puck’ by either setIntervall or MutationObserver. You’re question is near to collisiondetection which isn’t yet built in …
example of MutationObeserver is within pinball. it’ll check when the ball gets of thru pins …