Jan-19-2020, 08:25 AM
On 137 AND on 149 you set
snakePos = [100, 50]
. This is also the same as your snakeBody, so for block in snakeBody[1:]: if snakePos == block:will always be the case. And your snake can't move because every frame you set snakePos and snakeBody to the same thing. So the first thing to fix would be to not do this. I've never made a snake game, but my first impulse is to define these variables before the game loop starts, and not have your snake's head in the snakeBody list. The head can't collide with itself anyway, so there is no need for it there. As long as it's in there you'll trigger game over. I'm a newb to all this too, so the solution isn't immediately obvious to me, but I'm pretty sure this is the problem to solve.