-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesign.py
More file actions
90 lines (90 loc) · 3.81 KB
/
design.py
File metadata and controls
90 lines (90 loc) · 3.81 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
#different designs
#------------------------------------------------------------------------------------------------------------------------------------
def roboshape(choice):
if choice==0:
return [['i','i'],['[','0','0',']'],['/','|','_','_','|','\\'],['d','b']]
elif choice==1:
return [['\\','_','/'],['|','.','_','.','|'],['<','|','-','-','-','|','>'],['/','\\']]
elif choice==2:
return [['\\','*','!','*','/'],['[',']'],['/','\\']]
elif choice==3:
return [['*','!','*',],['/','\\']]
elif choice==4:
return [['\\','_','/'],['(','+','!','+',')'],['-','|','v','|','-'],['/','\\']]
elif choice==5:
return [['{','@','@','}'],['-','(','*',')','-'],['d','b']]
elif choice==6:
return [['^','v','^'],['/','\\']]
elif choice==7:
return [['[','.','.',']'],['/','_','^','_','\\'],['|','|']]
elif choice==8:
return [['(','^','^','^',')'],['|','\'','!','\'','|'],['i','i']]
elif choice==9:
return [['/','^','!','^','\\'],['|','|']]
#----------------------------------------------------------------------------------------------------------------------------------
def roboposition(choice,x,y):
if choice==0:
return [[[x-1,y-1],[x,y-1]],[[x-2,y],[x-1,y],[x,y],[x+1,y]],[[x-3,y+1],[x-2,y+1],[x-1,y+1],[x,y+1],[x+1,y+1],[x+2,y+1]],[[x-2,y+2],[x+1,y+2]]]
elif choice==1:
return [[[x-1,y-1],[x,y-1],[x+1,y-1]],[[x-2,y],[x-1,y],[x,y],[x+1,y],[x+2,y]],[[x-3,y+1],[x-2,y+1],[x-1,y+1],[x,y+1],[x+1,y+1],[x+2,y+1],[x+3,y+1]],[[x-1,y+2],[x+1,y+2]]]
elif choice==2:
return [[[x-2,y-1],[x-1,y-1],[x,y-1],[x+1,y-1],[x+2,y-1]],[[x-1,y],[x+1,y]],[[x-1,y+1],[x+1,y+1]]]
elif choice==3:
return [[[x-1,y],[x,y],[x+1,y]],[[x-1,y+1],[x+1,y+1]]]
elif choice==4:
return [[[x-1,y-1],[x,y-1],[x+1,y-1]],[[x-2,y],[x-1,y],[x,y],[x+1,y],[x+2,y]],[[x-2,y+1],[x-1,y+1],[x,y+1],[x+1,y+1],[x+2,y+1]],[[x-1,y+2],[x+1,y+2]]]
elif choice==5:
return [[[x-2,y-1],[x-1,y-1],[x+1,y-1],[x+2,y-1]],[[x-2,y],[x-1,y],[x,y],[x+1,y],[x+2,y]],[[x-1,y+1],[x+1,y+1]]]
elif choice==6:
return [[[x-1,y],[x,y],[x+1,y]],[[x-1,y+1],[x+1,y+1]]]
elif choice==7:
return [[[x-2,y-1],[x-1,y-1],[x+1,y-1],[x+2,y-1]],[[x-2,y],[x-1,y],[x,y],[x+1,y],[x+2,y]],[[x-1,y],[x+1,y]]]
elif choice==8:
return [[[x-2,y-1],[x-1,y-1],[x,y-1],[x+1,y-1],[x+2,y-1]],[[x-2,y],[x-1,y],[x,y],[x+1,y],[x+2,y]],[[x-1,y+1],[x+1,y+1]]]
elif choice==9:
return [[[x-2,y-1],[x-1,y-1],[x,y-1],[x+1,y-1],[x+2,y-1]],[[x-1,y],[x+1,y]]]
#-------------------------------------------------------------------------------------------------------------------------------------
def bombshape(choice):
if choice==0:
return [['/','\\'],['\\','/']]
elif choice==1:
return [['\\','^','/']]
elif choice==2:
return [['(','^',')']]
elif choice==3:
return [['[',']','[',']'],['[',']','[',']']]
elif choice==4:
return [['\\','/'],['/','\\']]
elif choice==5:
return [['x','x'],['x','x']]
elif choice==6:
return [['<','^','>'],['v']]
elif choice==7:
return [['*','*']]
elif choice==8:
return [['!'],['*']]
elif choice==9:
return [['#']]
#------------------------------------------------------------------------------------------------------------------------------------
def bombposition(choice,x,y):
if choice==0:
return [[[x,y],[x+1,y]],[[x,y+1],[x+1,y+1]]]
elif choice==1:
return [[[x-1,y],[x,y],[x+1,y]],[]]
elif choice==2:
return [[[x-1,y],[x,y],[x+1,y]],[]]
elif choice==3:
return [[[x-2,y],[x-1,y],[x,y],[x+1,y]],[[x-2,y+1],[x-1,y+1],[x,y+1],[x+1,y+1]]]
elif choice==4:
return [[[x,y],[x+1,y]],[[x,y+1],[x+1,y+1]]]
elif choice==5:
return [[[x,y],[x+1,y]],[[x,y+1],[x+1,y+1]]]
elif choice==6:
return [[[x-1,y],[x,y],[x+1,y]],[[x,y+1]]]
elif choice==7:
return [[[x-1,y],[x,y]],[]]
elif choice==8:
return [[[x,y]],[[x,y+1]]]
elif choice==9:
return [[[x,y]],[]]
#------------------------------------------------------------------------------------------------------------------------------------