Snake Game problem: having trouble figuring out how to make it reset

Pet peeve: Don’t do this. Code that is self-explanatory doesn’t need useless comments.


Your code has some real problems. For a start, what are you doing inside draw()?
Normally, people making a snake game would clear the background in draw(), and then draw the snake. But you aren’t doing either of these things! Instead, your draw() function is… resetting the snake?!?

This isn’t the sort of things we can help fix. It’s a glaring logical issue. Did you develop this code step by step?


I recently did snake. I suggest you go have a look over here: