-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathChase_game.py
60 lines (59 loc) · 1.18 KB
/
Chase_game.py
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
import tkinter as tk
win = tk.Tk()
win.geometry("400x400+100+100")
a = 0
b = 0
for x in range(32):
f1 = tk.Frame(win,height=50,width=50,bg="black")
f1.place(x=a,y=b)
a+=100
if(a == 400 and b == 0):
b+=50
a=50
if(a == 450 and b == 50):
b+=50
a=0
if(a == 400 and b == 100):
b+=50
a=50
if(a == 450 and b == 150):
b+=50
a=0
if(a == 400 and b == 200):
b+=50
a=50
if(a == 450 and b == 250):
b+=50
a=0
if(a == 400 and b == 300):
b+=50
a=50
# with all for loop
# a = 0
# b = 100
# for x in range(8):
# f1 = tk.Frame(win,height=50,width=50,bg="black")
# f1.place(x=a,y=b)
# a+=100
# if(a == 400 and b == 100):
# b+=50
# a=50
# a = 0
# b = 200
# for x in range(8):
# f1 = tk.Frame(win,height=50,width=50,bg="black")
# f1.place(x=a,y=b)
# a+=100
# if(a == 400 and b == 200):
# b+=50
# a=50
# a = 0
# b = 300
# for x in range(8):
# f1 = tk.Frame(win,height=50,width=50,bg="black")
# f1.place(x=a,y=b)
# a+=100
# if(a == 400 and b == 300):
# b+=50
# a=50
win.mainloop()