-
Notifications
You must be signed in to change notification settings - Fork 1
/
ar_fn_1.py
32 lines (30 loc) · 982 Bytes
/
ar_fn_1.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
def check_c(a,b,c):
for i in range(3):
if a[i]==b[i]==c[i]:
print a[i]," is winner"
return 1
break
def check_r(a,b,c):
for i in range(1):
if a[i]==a[i+1]==a[i+2]:
print a[i]," is winner"
return 1
break
elif b[i]==b[i+1]==b[i+2]:
print b[i]," is winner"
return 1
break
elif c[i]==c[i+1]==c[i+2]:
print c[i]," is winner"
return 1
break
def check_d(a,b,c):
for i in range(1):
if a[i]==b[i+1]==c[i+2]:
print a[i]," is winner"
return 1
break
elif c[i]==b[i+1]==a[i+2]:
print c[i]," is winner"
return 1
break