don't touch the black and collect all the balls. Your snake gets longer for each collected ball. I included a lot of notes in the program to show how it works. the variable is your length
I got the idea for this from griffpatches slither IO project and honestly when I think hard about it I don't really understand how this works