from turtle import Screen, Turtle
from snake import Snake
import time

# tim = Turtle()
# tim.speed(0)
screen = Screen()
snake = Snake()
screen.setup(width=600, height=600)
screen.bgcolor("black")
screen.title("Snake Game")
screen.tracer(0)
screen.listen()

screen.onkey(key="Up", fun=snake.up)
screen.onkey(key="Down", fun=snake.down)
screen.onkey(key="Left", fun=snake.left)
screen.onkey(key="Right", fun=snake.right)

game_is_on = True
while game_is_on:
  screen.update()
  time.sleep(0.1)
  
  snake.move()






screen.exitonclick()