test

mail@pastecode.io avatar
unknown
python
2 years ago
340 B
2
Indexable
Never
from turtle import Screen

screen = Screen()
screen.setup(width=600, height=600)
screen.bgcolor("black")
screen.title("My Snake Game")
screen.tracer(0)


def up():
    print("inside")


game_on = True
screen.listen()

while game_on:

    print("before")
    screen.update()
    time.sleep(2)
    screen.onkey(up, "w")