Answer the question
In order to leave comments, you need to log in
The program does not want to run?
I need the "finish" cycle to start immediately after the snake reaches the field boundaries, but this does not happen, i.e. the "finish" loop does not start itself, but only after I perform some action (press any key, etc.) Here is the code itself:
# What we are doing if we have collision
if snake_x >= 1051 or snake_x <= 209 or snake_y >= 841 or snake_y <= -1:
# starting "game over" loop
finish = True
while finish:
window.fill((0, 0, 0)) ...
Answer the question
In order to leave comments, you need to log in
# What we are doing if we have collision
if snake_x >= 1051 or snake_x <= 209 or snake_y >= 841 or snake_y <= -1:
# starting "game over" loop
finish = True
while finish:
window.fill((0, 0, 0)) ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question