Проблема в том, что я не могу повышать уровень игры всякий раз, когда моя змея ест еду
ну, вот мой очень длинный длинный код..
from turtle import *
import random
title("Snake Game") #title of the game
setup(555,555) #sets the screensize into 555x555 px
bgcolor("orange") #background color
#pressed key functions
def up():
penup()
pendown()
head(90)
def right():
penup()
pendown()
head(0)
def left():
penup()
pendown()
head(180)
def down():
penup()
pendown()
head(270)
#draw dot
def dotx():
pen2.penup()
pen2.goto(x1,y1)
pen2.pendown()
pen2.dot(20,"green")
#heading of the snake
def head(x):
for i in range(9999999):
for ii in range(20):
seth(x)
fd(2)
if xcor()>=250.0 or ycor()>=250.0 or xcor()=250.0 or xcor()
Подробнее здесь: https://stackoverflow.com/questions/286 ... snake-game
Мобильная версия