the game broke... the green snail is touching the end then restarting
This one is such a mess. Don't even look at the code behind it. I recommend you check on "The Sprinkles Scare Me", where I reimplemented this idea with much more grace, and it is just one part of a larger game