#This code will allow your turtle move around using the arrow keys
#Create a maze for your turtle to navigate to.

import turtle
player1 = turtle.Turtle()
scr = turtle.Screen()


def m1():    #moves player1 up
    player1.setheading(90)
    player1.fd(30)
    player1.pos()
    print(Player1.pos())

def m2():    #moves player1 left
    player1.setheading(180)
    player1.fd(30)
    player1.pos()
    print(player1.pos())

def m3():    #moves player1 right
    player1.setheading(360)
    player1.fd(30)
    player1.pos()
    print(player1.pos())

def m4():    #moves player1 down
    player1.setheading(-90)
    player1.fd(30)
    player1.pos()
    print(player1.pos())

scr.onkey(m1, "Up")
scr.onkey(m2, "Left")
scr.onkey(m3, "Right")
scr.onkey(m4, "Down")
scr.listen()

player1.shape("turtle")
player1.pencolor("Coral")
player1.speed("fastest")

player1.forward(50)
player1.right(90)
player1.forward(100)
player1.left(90)
player1.forward(100)
player1.left(90)
player1.forward(50)
player1.left(90)
player1.forward(50)
player1.backward(50)
player1.left(90)
player1.forward(50)
player1.right(90)
player1.forward(50)
player1.left(90)
player1.forward(50)
player1.backward(50)
player1.right(90)
player1.forward(50)
player1.right(90)
player1.forward(100)
player1.right(90)
player1.forward(500)
player1.backward(100)
player1.right(90)
player1.forward(50)
player1.right(90)
player1.forward(50)
player1.backward(50)
player1.right(90)
player1.forward(50)
player1.right(90)
player1.forward(100)
player1.right(90)
player1.forward(100)
player1.right(90)
player1.forward(190)
player1.left(90)
player1.forward(100)
player1.right(90)
player1.forward(50)
player1.left(90)
player1.forward(50)
player1.backward(50)
player1.left(90)
player1.forward(50)
player1.left(90)
player1.forward(50)
player1.right(90)
player1.forward(50)
player1.backward(150)
player1.left(90)
player1.forward(50)
player1.left(90)
player1.forward(40)
player1.backward(40)
player1.left(90)
player1.forward(50)
player1.left(90)
player1.forward(100)
player1.left(90)
player1.forward(50)
player1.right(90)
player1.forward(142)
player1.left(90)
player1.forward(50)
player1.right(180)
player1.forward(120)
player1.left(90)
player1.forward(50)
player1.right(90)
player1.forward(130)
player1.right(90)
player1.forward(50)
player1.backward(100)
player1.forward(50)
player1.right(90)
player1.forward(130)
player1.left(90)
player1.forward(50)
player1.right(90)
player1.forward(70)
player1.left(90)
player1.forward(45)
player1.left(90)
player1.forward(104)
player1.right(90)
player1.forward(30)
player1.left(90)
player1.forward(96)
player1.backward(50)
player1.left(90)
player1.forward(70)
player1.backward(70)
player1.right(90)
player1.forward(80)
player1.right(90)
player1.forward(100)
player1.backward(50)
player1.right(90)
player1.forward(90)
player1.backward(90)
player1.left(90)
player1.forward(130)
player1.right(90)
player1.forward(130)
player1.left(90)
player1.forward(300)
player1.right(90)
player1.forward(200)
player1.backward(100)
player1.right(90)
player1.forward(45)
player1.right(90)
player1.forward(50)
player1.backward(50)
player1.right(90)
player1.forward(45)
player1.left(90)
player1.forward(100)
player1.penup()
player1.forward(120)
player1.left(90)
player1.forward(480)
player1.right(90)
player1.pendown()
player1.forward(25)
player1.left(90)
player1.forward(165)
player1.penup()
player1.left(90)
player1.forward(400)
player1.left(90)
player1.forward(400)
player1.write("Ready to Play? Press B to Start.", font=("Arial", 18, "bold"))

scr.onkey("B")
  
