-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRace.py
More file actions
99 lines (91 loc) · 2.25 KB
/
Copy pathRace.py
File metadata and controls
99 lines (91 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import turtle
screen = turtle.Screen()
screen.title("TURTLE")
screen.bgcolor("skyblue")
t=turtle.Turtle()
t2 = turtle.Turtle()
t2.penup()
t2.hideturtle()
t3 =turtle.Turtle()
t3.penup()
t3.hideturtle()
t4 = turtle.Turtle()
t4.penup()
t4.hideturtle()
#--------------------------------------
#t.bgcolor("skyblue")
t.penup()
t.left(90)
t.shape("turtle")
t.shapesize(5,5,5)
t.goto(0,150)
#-------------------------------------------------
t2.goto(-105,50)
t2.write("Race The Road",font=("arabic",20,"normal"))
#-----------------------------------------------
t3.color(('#a44545'))
t3.goto(-85,0)
t3.write("WELCOME'S YOU",font=("arabic",15,"normal"))
#-----------------------------------------------------
t4.goto(-258 ,-62)
t4.pendown()
t4.forward(100)
t4.right(90)
t4.forward(50)
t4.right(90)
t4.forward(100)
t4.right(90)
t4.forward(50)
#-----------------------------------------------------
t4.penup()
t4.right(90)
t4.forward(200)
t4.pendown()
t4.forward(100)
t4.right(90)
t4.forward(50)
t4.right(90)
t4.forward(100)
t4.right(90)
t4.forward(50)
#-------------------------------------------------------
t4.penup()
t4.right(90)
t4.forward(200)
t4.pendown()
t4.forward(100)
t4.right(90)
t4.forward(50)
t4.right(90)
t4.forward(100)
t4.right(90)
t4.forward(50)
t4.penup()
#-------------------------------------------------------
t4.penup()
t4.goto(-130 ,-200)
t4.write("CLICK TO CHOOSE",font=("arabic",20,"normal"))
#----------------------------------------------------------
t4.goto(-233,-100)
t4.write("MAP 1",font=("arabic",15,"normal"))
#---------------------------------------------------------
t4.goto(-20,-97)
t4.write("MAP 2",font=("arabic",15,"normal"))
#------------------------------------------------------------
t4.goto(171,-98)
t4.write("MAP 3",font=("arabic",15,"normal"))
#---------------------------------------------------------------
def bt(x,y):
# print(x,y)
if x < -158 and x > -258 and y < -62 and y > -112:
screen.reset()
t.hideturtle()
t2.hideturtle()
t3.hideturtle()
t4.hideturtle()
import map_1 as g
elif x < 43 and x > -58 and y < -62 and y > -112:
print("you clicked button 2")
elif x < 242 and x > 143 and y < -62 and y > -112:
print("you clicked button 3")
turtle.onscreenclick(bt)